Changeset 2561
- Timestamp:
- 09/11/23 14:47:01 (16 months ago)
- Location:
- XIOS3/trunk/src/transport
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS3/trunk/src/transport/one_sided_context_server.cpp
r2547 r2561 101 101 if (flag==true) 102 102 { 103 requests_.push_back(new CRequest(interCommMerged_, status)) ; 104 if (requests_.back()->test()) 103 int rank=status.MPI_SOURCE ; 104 requests_[rank].push_back(new CRequest(interCommMerged_, status)) ; 105 // Test 1st request of the list, request treatment must be ordered 106 if (requests_[rank].front()->test()) 105 107 { 106 processRequest(*(requests_ .back())) ;107 delete requests_ .back();108 requests_ .pop_back() ;108 processRequest(*(requests_[rank].front())) ; 109 delete requests_[rank].front(); 110 requests_[rank].pop_front() ; 109 111 } 110 112 } … … 114 116 void COneSidedContextServer::listenPendingRequest(void) 115 117 { 116 auto it = requests_.begin() ; 117 while (it != requests_.end()) 118 { 119 if ((*it)->test()) 120 { 121 processRequest(*(*it)) ; 122 delete (*it); 123 auto it2=it ; 124 ++it ; 125 requests_.erase(it2) ; 126 } 127 else ++it ; 118 for(auto it_rank=requests_.begin() ; it_rank!=requests_.end() ; ++it_rank) 119 { 120 int rank = it_rank->first; 121 while ( (!requests_[rank].empty()) && (requests_[rank].front()->test()) ) 122 { 123 processRequest( *(requests_[rank].front()) ); 124 delete requests_[rank].front(); 125 requests_[rank].pop_front() ; 126 } 128 127 } 129 128 } -
XIOS3/trunk/src/transport/one_sided_context_server.hpp
r2526 r2561 106 106 MPI_Request processEventRequest_ ; 107 107 108 std:: list<CRequest*>requests_ ;108 std::map<int,std::list<CRequest*> >requests_ ; 109 109 110 110 std::map<size_t, SPendingEvent> pendingEvents_ ;
Note: See TracChangeset
for help on using the changeset viewer.