Last change
on this file since 6607 was
6607,
checked in by acosce, 10 months ago
|
XIOS used for ICOLMDZORINCA_CO2_Transport_GMD_2023
|
File size:
1.3 KB
|
Rev | Line | |
---|
[6607] | 1 | #ifndef __CONTEXT_SERVER_HPP__ |
---|
| 2 | #define __CONTEXT_SERVER_HPP__ |
---|
| 3 | #include "xios_spl.hpp" |
---|
| 4 | #include "event_server.hpp" |
---|
| 5 | #include "buffer_server.hpp" |
---|
| 6 | #include "mpi.hpp" |
---|
| 7 | |
---|
| 8 | namespace xios |
---|
| 9 | { |
---|
| 10 | class CContext ; |
---|
| 11 | |
---|
| 12 | class CContextServer |
---|
| 13 | { |
---|
| 14 | public: |
---|
| 15 | |
---|
| 16 | CContextServer(CContext* parent,MPI_Comm intraComm,MPI_Comm interComm) ; |
---|
| 17 | bool eventLoop(bool enableEventsProcessing = true); |
---|
| 18 | void listen(void) ; |
---|
| 19 | bool listenPendingRequest(MPI_Status& status) ; |
---|
| 20 | void checkPendingRequest(void) ; |
---|
| 21 | void processRequest(int rank, char* buff,int count) ; |
---|
| 22 | void processEvents(void) ; |
---|
| 23 | bool hasFinished(void); |
---|
| 24 | void dispatchEvent(CEventServer& event) ; |
---|
| 25 | void setPendingEvent(void) ; |
---|
| 26 | bool hasPendingEvent(void) ; |
---|
| 27 | |
---|
| 28 | MPI_Comm intraComm ; |
---|
| 29 | int intraCommSize ; |
---|
| 30 | int intraCommRank ; |
---|
| 31 | |
---|
| 32 | MPI_Comm interComm ; |
---|
| 33 | int commSize ; |
---|
| 34 | |
---|
| 35 | map<int,CServerBuffer*> buffers ; |
---|
| 36 | map<int,MPI_Request> pendingRequest ; |
---|
| 37 | map<int,char*> bufferRequest ; |
---|
| 38 | |
---|
| 39 | map<size_t,CEventServer*> events ; |
---|
| 40 | size_t currentTimeLine ; |
---|
| 41 | CContext* context ; |
---|
| 42 | |
---|
| 43 | bool finished ; |
---|
| 44 | bool pendingEvent ; |
---|
| 45 | bool scheduled ; /*!< event of current timeline is alreading scheduled ? */ |
---|
| 46 | size_t hashId ; |
---|
| 47 | |
---|
| 48 | ~CContextServer() ; |
---|
| 49 | |
---|
| 50 | private: |
---|
| 51 | std::map<int, StdSize> mapBufferSize_; |
---|
| 52 | } ; |
---|
| 53 | |
---|
| 54 | } |
---|
| 55 | |
---|
| 56 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.