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:
924 bytes
|
Line | |
---|
1 | #ifndef __BUFFER_SERVER_HPP__ |
---|
2 | #define __BUFFER_SERVER_HPP__ |
---|
3 | |
---|
4 | #include "xios_spl.hpp" |
---|
5 | #include "buffer.hpp" |
---|
6 | #include "mpi.hpp" |
---|
7 | #include "cxios.hpp" |
---|
8 | |
---|
9 | namespace xios |
---|
10 | { |
---|
11 | class CServerBuffer |
---|
12 | { |
---|
13 | public: |
---|
14 | CServerBuffer(StdSize bufSize) ; |
---|
15 | ~CServerBuffer() ; |
---|
16 | |
---|
17 | bool isBufferFree(size_t count) ; |
---|
18 | void* getBuffer(size_t count) ; |
---|
19 | void freeBuffer(size_t count) ; |
---|
20 | void createWindows(MPI_Comm oneSidedComm) ; |
---|
21 | bool freeWindows(void) ; |
---|
22 | bool getBufferFromClient(size_t timeLine, char* & buffer, size_t& count) ; |
---|
23 | bool isBufferEmpty(void) ; |
---|
24 | void updateCurrentWindows(void) ; |
---|
25 | private: |
---|
26 | char* buffer; |
---|
27 | size_t first; // first occupied element |
---|
28 | size_t current; // first free element |
---|
29 | size_t end; |
---|
30 | size_t size; |
---|
31 | size_t used ; // count of element occupied |
---|
32 | MPI_Win windows[2] ; |
---|
33 | int currentWindows ; |
---|
34 | bool hasWindows ; |
---|
35 | }; |
---|
36 | } |
---|
37 | |
---|
38 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.