Changeset 512 for XIOS/trunk/src/context_client.hpp
- Timestamp:
- 11/14/14 17:56:37 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/context_client.hpp
r511 r512 12 12 class CContext ; 13 13 14 /*! 15 \class CContextClient 16 A context can be both on client and on server side. In order to differenciate the role of 17 context on each side, e.x client sending events, server receiving and processing events, there is a need of 18 concrete "context" classes for both sides. 19 CContextClient processes and sends events from client to server where CContextServer receives these events 20 and processes them. 21 */ 14 22 class CContextClient 15 23 { 24 public: 25 // Contructor 26 CContextClient(CContext* parent,MPI_Comm intraComm, MPI_Comm interComm, CContext* parentServer = 0) ; 16 27 17 public:18 CContextClient(CContext* parent,MPI_Comm intraComm, MPI_Comm interComm, CContext* parentServer = 0) ;19 // void registerEvent(CEventClient& event) ;28 // Send event to server 29 void sendEvent(CEventClient& event) ; 30 void waitEvent(list<int>& ranks) ; 20 31 21 // list<CBufferOut*> newEvent(CEventClient& event,list<int>& sizes) ; 22 void sendEvent(CEventClient& event) ; 23 32 // Functions relates to set/get buffers 24 33 list<CBufferOut*> getBuffers(list<int>& serverlist, list<int>& sizeList) ; 25 34 void newBuffer(int rank) ; 26 size_t timeLine ;27 int clientRank ;28 int clientSize ;29 int serverSize ;30 // set<int> connectedServer ;31 MPI_Comm interComm ;32 MPI_Comm intraComm ;33 map<int,CClientBuffer*> buffers ;34 35 bool checkBuffers(list<int>& ranks) ; 35 36 bool checkBuffers(void); 36 37 void releaseBuffers(void); 37 void closeContext(void) ; 38 38 39 bool isServerLeader(void) ; 39 40 int getServerLeader(void) ; 41 42 // Close and finalize context client 43 void closeContext(void) ; 40 44 void finalize(void) ; 41 void waitEvent(list<int>& ranks) ;42 45 43 46 void setBufferSize(const std::map<int, StdSize>& mapSize); 44 47 void sendBufferSizeEvent(); 45 48 46 CContext* context ; 49 public: 50 CContext* context ; //!< Context for client 51 52 size_t timeLine ; //!< Timeline of each event 53 54 int clientRank ; //!< Rank of current client 55 56 int clientSize ; //!< Size of client group 57 58 int serverSize ; //!< Size of server group 59 60 MPI_Comm interComm ; //!< Communicator of server group 61 62 MPI_Comm intraComm ; //!< Communicator of client group 63 64 map<int,CClientBuffer*> buffers ; //!< Buffers for connection to servers 47 65 48 66 private: 49 std::map<int, StdSize> mapBufferSize_; 50 CContext* parentServer; 67 //! Mapping of server and buffer size for each connection to server 68 std::map<int, StdSize> mapBufferSize_; 69 70 //! Context for server (Only used in attached mode) 71 CContext* parentServer; 72 73 public: // Some function should be removed in the future 74 // void registerEvent(CEventClient& event) ; 75 // list<CBufferOut*> newEvent(CEventClient& event,list<int>& sizes) ; 51 76 // bool locked ; 77 // set<int> connectedServer ; 52 78 53 79 } ; 54 55 56 57 58 80 } 59 81 60 61 62 #endif 82 #endif // __CONTEXT_CLIENT_HPP__
Note: See TracChangeset
for help on using the changeset viewer.