Changeset 1757 for XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/context_client.hpp
- Timestamp:
- 10/18/19 14:55:57 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/context_client.hpp
r1639 r1757 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, … … 56 54 // Close and finalize context client 57 55 // void closeContext(void); Never been implemented. 56 bool isNotifiedFinalized(void) ; 58 57 void finalize(void); 59 58 … … 71 70 int serverSize; //!< Size of server group 72 71 73 MPI_Comm interComm; //!< Communicator of server group 72 MPI_Comm interComm; //!< Communicator of server group (interCommunicator) 73 74 MPI_Comm interCommMerged; //!< Communicator of the client group + server group (intraCommunicator) needed for one sided communication. 74 75 75 76 MPI_Comm intraComm; //!< Communicator of client group 76 77 78 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 79 77 80 map<int,CClientBuffer*> buffers; //!< Buffers for connection to servers 78 81 82 bool pureOneSided ; //!< if true, client will communicated with servers only trough one sided communication. Otherwise the hybrid mode P2P /One sided is used. 83 79 84 private: 85 void lockBuffers(list<int>& ranks) ; 86 void unlockBuffers(list<int>& ranks) ; 87 80 88 //! Mapping of server and buffer size for each connection to server 81 89 std::map<int,StdSize> mapBufferSize_; … … 84 92 //! Maximum number of events that can be buffered 85 93 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 94 103 95 //! Context for server (Only used in attached mode) … … 110 102 std::list<int> ranksServerNotLeader; 111 103 104 std::vector<std::vector<MPI_Win> >windows ; //! one sided mpi windows to expose client buffers to servers == windows[nbServers][2] 105 106 112 107 }; 113 108 }
Note: See TracChangeset
for help on using the changeset viewer.