Last change
on this file since 2258 was
2258,
checked in by ymipsl, 3 years ago
|
One sided protocol improvment.
YM
|
-
Property copyright set to
Software name : XIOS (Xml I/O Server) http://forge.ipsl.jussieu.fr/ioserver Creation date : January 2009 Licence : CeCCIL version2 see license file in root directory : Licence_CeCILL_V2-en.txt or http://www.cecill.info/licences/Licence_CeCILL_V2-en.html Holder : CEA/LSCE (Laboratoire des Sciences du CLimat et de l'Environnement) CNRS/IPSL (Institut Pierre Simon Laplace) Project Manager : Yann Meurdesoif yann.meurdesoif@cea.fr
|
File size:
1.3 KB
|
Rev | Line | |
---|
[300] | 1 | #ifndef __BUFFER_SERVER_HPP__ |
---|
| 2 | #define __BUFFER_SERVER_HPP__ |
---|
| 3 | |
---|
[2246] | 4 | #include "buffer_cs_base.hpp" |
---|
[591] | 5 | #include "xios_spl.hpp" |
---|
[342] | 6 | #include "buffer.hpp" |
---|
[382] | 7 | #include "mpi.hpp" |
---|
[509] | 8 | #include "cxios.hpp" |
---|
[300] | 9 | |
---|
[335] | 10 | namespace xios |
---|
[300] | 11 | { |
---|
[2246] | 12 | class CServerBuffer : public CBufferClientServerBase |
---|
[300] | 13 | { |
---|
| 14 | public: |
---|
[1757] | 15 | CServerBuffer(vector<MPI_Win>& windows, vector<MPI_Aint>& winAddress, int windowsRank, StdSize bufSize) ; |
---|
[717] | 16 | ~CServerBuffer() ; |
---|
[509] | 17 | |
---|
[717] | 18 | bool isBufferFree(size_t count) ; |
---|
| 19 | void* getBuffer(size_t count) ; |
---|
| 20 | void freeBuffer(size_t count) ; |
---|
[1757] | 21 | void createWindows(MPI_Comm oneSidedComm) ; |
---|
| 22 | bool getBufferFromClient(size_t timeLine, char* & buffer, size_t& count) ; |
---|
| 23 | bool isBufferEmpty(void) ; |
---|
| 24 | void updateCurrentWindows(void) ; |
---|
| 25 | void lockBuffer(void) ; |
---|
| 26 | void unlockBuffer(void) ; |
---|
| 27 | void notifyClientFinalize(void) ; |
---|
[2246] | 28 | void notifyBufferResizing(void) ; |
---|
[717] | 29 | private: |
---|
| 30 | char* buffer; |
---|
| 31 | size_t first; // first occupied element |
---|
| 32 | size_t current; // first free element |
---|
| 33 | size_t end; |
---|
| 34 | size_t size; |
---|
[1757] | 35 | size_t used ; // count of element occupied |
---|
| 36 | std::vector<MPI_Win> windows_ ; |
---|
| 37 | std::vector<MPI_Aint> winAddress_ ; |
---|
[2130] | 38 | bool resizingBuffer_ = false ; |
---|
[1757] | 39 | int currentWindows ; |
---|
| 40 | bool hasWindows ; |
---|
| 41 | int windowsRank_ ; |
---|
[2246] | 42 | double bufferFromClientLatency_=1e-1 ; |
---|
| 43 | double bufferFromClientTime_ = 0; |
---|
| 44 | |
---|
[717] | 45 | }; |
---|
[300] | 46 | } |
---|
| 47 | |
---|
| 48 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.