source:
XIOS/dev/dev_olga/src/context_server.hpp
@
1193
Last change on this file since 1193 was 1158, checked in by oabramkina, 7 years ago | |
---|---|
|
|
File size: 1.2 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 | |
[1158] | 16 | CContextServer(CContext* parent,MPI_Comm intraComm,MPI_Comm interComm) ; |
[1054] | 17 | bool eventLoop(bool enableEventsProcessing = true); |
[300] | 18 | void listen(void) ; |
19 | void checkPendingRequest(void) ; | |
[1158] | 20 | void processRequest(int rank, char* buff,int count) ; |
[300] | 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 | |
[300] | 27 | MPI_Comm intraComm ; |
28 | int intraCommSize ; | |
29 | int intraCommRank ; | |
[511] | 30 | |
[300] | 31 | MPI_Comm interComm ; |
32 | int commSize ; | |
[511] | 33 | |
[300] | 34 | map<int,CServerBuffer*> buffers ; |
35 | map<int,MPI_Request> pendingRequest ; | |
36 | map<int,char*> bufferRequest ; | |
[511] | 37 | |
[300] | 38 | map<size_t,CEventServer*> events ; |
39 | size_t currentTimeLine ; | |
[345] | 40 | CContext* context ; |
[697] | 41 | |
[300] | 42 | bool finished ; |
43 | bool pendingEvent ; | |
[492] | 44 | bool scheduled ; /*!< event of current timeline is alreading scheduled ? */ |
45 | size_t hashId ; | |
[1054] | 46 | |
[511] | 47 | ~CContextServer() ; |
48 | ||
49 | private: | |
[1158] | 50 | std::map<int, StdSize> mapBufferSize_; |
[300] | 51 | } ; |
52 | ||
53 | } | |
54 | ||
55 | #endif |
Note: See TracBrowser
for help on using the repository browser.