Last change
on this file since 1547 was
1547,
checked in by ymipsl, 6 years ago
|
New communication protocol between clients and servers, using hybrid mode of p2p mixt with one_sided communication in order to avoid dead-locking. The constraint of the maximum number of event that can be bufferized on client side is released.
Dev branch is created to be tested before merging.
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
|
Line | |
---|
1 | #ifndef __BUFFER_CLIENT_HPP__ |
---|
2 | #define __BUFFER_CLIENT_HPP__ |
---|
3 | |
---|
4 | #include "xios_spl.hpp" |
---|
5 | #include "buffer_out.hpp" |
---|
6 | #include "mpi.hpp" |
---|
7 | #include "cxios.hpp" |
---|
8 | |
---|
9 | namespace xios |
---|
10 | { |
---|
11 | class CClientBuffer |
---|
12 | { |
---|
13 | public: |
---|
14 | static size_t maxRequestSize; |
---|
15 | |
---|
16 | CClientBuffer(MPI_Comm intercomm, int serverRank, StdSize bufferSize, StdSize estimatedMaxEventSize); |
---|
17 | ~CClientBuffer(); |
---|
18 | void createWindows(MPI_Comm oneSidedComm) ; |
---|
19 | void freeWindows(void) ; |
---|
20 | void lockBuffer(void) ; |
---|
21 | void unlockBuffer(void) ; |
---|
22 | |
---|
23 | bool isBufferFree(StdSize size); |
---|
24 | CBufferOut* getBuffer(size_t timeLine, StdSize size); |
---|
25 | bool checkBuffer(bool send=false); |
---|
26 | bool hasPendingRequest(void); |
---|
27 | StdSize remain(void); |
---|
28 | |
---|
29 | private: |
---|
30 | char* buffer[2]; |
---|
31 | char* bufferHeader[2]; |
---|
32 | size_t* firstTimeLine[2] ; |
---|
33 | size_t* bufferCount[2] ; |
---|
34 | size_t* control[2] ; |
---|
35 | bool winState[2] ; |
---|
36 | int current; |
---|
37 | |
---|
38 | StdSize count; |
---|
39 | StdSize maxEventSize; |
---|
40 | const StdSize bufferSize; |
---|
41 | const StdSize estimatedMaxEventSize; |
---|
42 | |
---|
43 | |
---|
44 | const int serverRank; |
---|
45 | bool pending; |
---|
46 | |
---|
47 | MPI_Request request; |
---|
48 | |
---|
49 | CBufferOut* retBuffer; |
---|
50 | const MPI_Comm interComm; |
---|
51 | MPI_Win windows[2] ; |
---|
52 | bool hasWindows ; |
---|
53 | static const int headerSize=3*sizeof(size_t); |
---|
54 | }; |
---|
55 | } |
---|
56 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.