Changeset 2559
- Timestamp:
- 09/11/23 10:44:17 (16 months ago)
- Location:
- XIOS3/trunk/src/transport
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS3/trunk/src/transport/p2p_context_server.cpp
r2556 r2559 104 104 if (requests_.back()->test()) 105 105 { 106 processRequest(*(requests_.back())) ; 107 delete requests_.back(); 108 requests_.pop_back() ; 106 if ( processRequest( *(requests_.back()) ) ) 107 { 108 delete requests_.back(); 109 requests_.pop_back() ; 110 } 109 111 } 110 112 } … … 119 121 if ((*it)->test()) 120 122 { 121 processRequest(*(*it)) ; 122 delete (*it); 123 auto it2=it ; 124 ++it ; 125 requests_.erase(it2) ; 123 if (processRequest(*(*it))) 124 { 125 delete (*it); 126 auto it2=it ; 127 ++it ; 128 requests_.erase(it2) ; 129 } 126 130 } 127 131 else ++it ; … … 129 133 } 130 134 131 voidCP2pContextServer::processRequest(CRequest& request)135 bool CP2pContextServer::processRequest(CRequest& request) 132 136 { 133 137 int rank = request.getRank() ; 134 138 auto it=buffers_.find(rank); 135 if (it==buffers_.end()) 139 // getCount(new CP2pServerBuffer) = sizeof(MPI_AINT) 140 // getCount(RESIZE) : size_t timeline, size_t size + size_t EVENT_BUFFER_RESIZE = 24 141 // getCount(HEADER) : size_t timeline, int nbSenders, int nbBlocs 142 // + nbBlocs * (sizeof(MPI_Aint) addr + int count + int window) = 16 + nbBlocs * 16 143 if ((it==buffers_.end())&&(request.getCount() < 3*sizeof(size_t))) 136 144 { 137 145 buffers_[rank] = new CP2pServerBuffer(rank, commSelf_, interCommMerged_, pendingEvents_, completedEvents_, request.getBuffer()) ; 138 } 139 else it->second->receivedRequest(request.getBuffer()) ; 146 return true; 147 } 148 else if (it!=buffers_.end()) { 149 it->second->receivedRequest(request.getBuffer()) ; 150 return true; 151 } 152 else 153 return false; 140 154 } 141 155 -
XIOS3/trunk/src/transport/p2p_context_server.hpp
r2556 r2559 63 63 void listen(void) ; 64 64 void listenPendingRequest(void) ; 65 voidprocessRequest(CRequest& request) ;65 bool processRequest(CRequest& request) ; 66 66 void checkBuffers(void) ; 67 67 void processEvents(bool enableEventsProcessing) ;
Note: See TracChangeset
for help on using the changeset viewer.