Changeset 1547 for XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/context_client.hpp
- Timestamp:
- 06/20/18 09:09:23 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/context_client.hpp
r1232 r1547 31 31 // Send event to server 32 32 void sendEvent(CEventClient& event); 33 bool sendTemporarilyBufferedEvent();34 33 void waitEvent(list<int>& ranks); 35 34 36 35 // Functions to set/get buffers 37 bool getBuffers(const list<int>& serverList, const list<int>& sizeList, list<CBufferOut*>& retBuffers, bool nonBlocking = false);36 bool getBuffers(const size_t timeLine, const list<int>& serverList, const list<int>& sizeList, list<CBufferOut*>& retBuffers, bool nonBlocking = false); 38 37 void newBuffer(int rank); 39 38 bool checkBuffers(list<int>& ranks); … … 48 47 49 48 bool isAttachedModeEnabled() const; 50 bool hasTemporarilyBufferedEvent() const { return !tmpBufferedEvent.isEmpty(); };51 49 52 50 static void computeLeader(int clientRank, int clientSize, int serverSize, … … 71 69 int serverSize; //!< Size of server group 72 70 73 MPI_Comm interComm; //!< Communicator of server group 71 MPI_Comm interComm; //!< Communicator of server group (interCommunicator) 72 73 MPI_Comm interCommMerged; //!< Communicator of the client group + server group (intraCommunicator) needed for one sided communication. 74 74 75 75 MPI_Comm intraComm; //!< Communicator of client group 76 76 77 MPI_Comm commSelf; //!< Communicator of the client alone. Needed to create a new communicator between 1 proc client and 1 proc server for one sided communication 78 77 79 map<int,CClientBuffer*> buffers; //!< Buffers for connection to servers 78 80 81 bool pureOneSided ; //!< if true, client will communicated with servers only trough one sided communication. Otherwise the hybrid mode P2P /One sided is used. 82 79 83 private: 84 void lockBuffers(list<int>& ranks) ; 85 void unlockBuffers(list<int>& ranks) ; 86 80 87 //! Mapping of server and buffer size for each connection to server 81 88 std::map<int,StdSize> mapBufferSize_; … … 84 91 //! Maximum number of events that can be buffered 85 92 StdSize maxBufferedEvents; 86 87 struct {88 std::list<int> ranks, sizes;89 std::list<CBufferOut*> buffers;90 91 bool isEmpty() const { return ranks.empty(); };92 void clear() {93 ranks.clear();94 sizes.clear();95 96 for (std::list<CBufferOut*>::iterator it = buffers.begin(); it != buffers.end(); it++)97 delete *it;98 99 buffers.clear();100 };101 } tmpBufferedEvent; //! Event temporarily buffered (used only on the server)102 93 103 94 //! Context for server (Only used in attached mode)
Note: See TracChangeset
for help on using the changeset viewer.