Last change
on this file since 1077 was
1054,
checked in by oabramkina, 7 years ago
|
dev: intermediate commit.
|
-
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 __CONTEXT_SERVER_HPP__ |
---|
[327] | 2 | #define __CONTEXT_SERVER_HPP__ |
---|
[591] | 3 | #include "xios_spl.hpp" |
---|
[300] | 4 | #include "event_server.hpp" |
---|
| 5 | #include "buffer_server.hpp" |
---|
[382] | 6 | #include "mpi.hpp" |
---|
[300] | 7 | |
---|
[335] | 8 | namespace xios |
---|
[300] | 9 | { |
---|
[345] | 10 | class CContext ; |
---|
[511] | 11 | |
---|
[300] | 12 | class CContextServer |
---|
| 13 | { |
---|
| 14 | public: |
---|
[511] | 15 | |
---|
[992] | 16 | CContextServer(CContext* parent, MPI_Comm intraComm, MPI_Comm interComm) ; |
---|
[1054] | 17 | |
---|
| 18 | bool eventLoop(bool enableEventsProcessing = true); |
---|
[300] | 19 | void listen(void) ; |
---|
| 20 | void checkPendingRequest(void) ; |
---|
| 21 | void processEvents(void) ; |
---|
[1054] | 22 | bool hasFinished(void); |
---|
[300] | 23 | void dispatchEvent(CEventServer& event) ; |
---|
| 24 | void setPendingEvent(void) ; |
---|
| 25 | bool hasPendingEvent(void) ; |
---|
[511] | 26 | |
---|
[1054] | 27 | void processRequest(int rank, char* buff,int count) ; |
---|
| 28 | |
---|
[300] | 29 | MPI_Comm intraComm ; |
---|
| 30 | int intraCommSize ; |
---|
| 31 | int intraCommRank ; |
---|
[511] | 32 | |
---|
[300] | 33 | MPI_Comm interComm ; |
---|
| 34 | int commSize ; |
---|
[511] | 35 | |
---|
[300] | 36 | map<int,CServerBuffer*> buffers ; |
---|
| 37 | map<int,MPI_Request> pendingRequest ; |
---|
| 38 | map<int,char*> bufferRequest ; |
---|
[511] | 39 | |
---|
[300] | 40 | map<size_t,CEventServer*> events ; |
---|
| 41 | size_t currentTimeLine ; |
---|
[345] | 42 | CContext* context ; |
---|
[697] | 43 | |
---|
[300] | 44 | bool finished ; |
---|
| 45 | bool pendingEvent ; |
---|
[492] | 46 | bool scheduled ; /*!< event of current timeline is alreading scheduled ? */ |
---|
| 47 | size_t hashId ; |
---|
[1054] | 48 | |
---|
| 49 | static size_t getTotalBuf(void); |
---|
| 50 | |
---|
[511] | 51 | ~CContextServer() ; |
---|
| 52 | |
---|
| 53 | private: |
---|
[1054] | 54 | std::map<int, StdSize> mapBufferSize_; |
---|
| 55 | static size_t totalBuf_ ; /*!< Total memory allocated by servers per context.*/ |
---|
[983] | 56 | |
---|
[300] | 57 | } ; |
---|
| 58 | |
---|
| 59 | } |
---|
| 60 | |
---|
| 61 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.