- Timestamp:
- 11/19/21 15:41:40 (3 years ago)
- Location:
- XIOS/dev/dev_ym/XIOS_COUPLING/src
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_ym/XIOS_COUPLING/src/buffer_client.cpp
r2259 r2260 248 248 MPI_Status status; 249 249 int flag; 250 251 if (hasWindows) 252 { 253 MPI_Win_lock(MPI_LOCK_EXCLUSIVE, clientRank_, 0, windows_[0]) ; 254 MPI_Win_unlock(clientRank_, windows_[0]) ; 255 256 MPI_Win_lock(MPI_LOCK_EXCLUSIVE, clientRank_, 0, windows_[1]) ; 257 MPI_Win_unlock(clientRank_, windows_[1]) ; 258 } 259 250 MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &flag, MPI_STATUS_IGNORE); 251 260 252 if (pending) 261 253 { -
XIOS/dev/dev_ym/XIOS_COUPLING/src/buffer_client.hpp
r2259 r2260 71 71 bool hasWindows ; 72 72 73 double latency_= 1e-2;73 double latency_=0 ; 74 74 double lastCheckedWithNothing_=0 ; 75 75 double lastCheckedNotify_=0 ; -
XIOS/dev/dev_ym/XIOS_COUPLING/src/buffer_server.hpp
r2258 r2260 40 40 bool hasWindows ; 41 41 int windowsRank_ ; 42 double bufferFromClientLatency_= 1e-1 ;42 double bufferFromClientLatency_=0e-1 ; 43 43 double bufferFromClientTime_ = 0; 44 44 -
XIOS/dev/dev_ym/XIOS_COUPLING/src/client.cpp
r2238 r2260 431 431 double time ; 432 432 double lastTime=0 ; 433 double latency= 1e-2;433 double latency=0 ; 434 434 bool out=false ; 435 435 while (!out) -
XIOS/dev/dev_ym/XIOS_COUPLING/src/context_client.cpp
r2259 r2260 118 118 { 119 119 list<int> ranks = event.getRanks(); 120 info(100)<<"Event "<<timeLine<<" of context "<<context_->getId()<<endl ; 120 121 // ostringstream str ; 122 // for(auto& rank : ranks) str<<rank<<" ; " ; 123 // info(100)<<"Event "<<timeLine<<" of context "<<context_->getId()<<" for ranks : "<<str.str()<<endl ; 124 121 125 if (CXios::checkEventSync) 122 126 { … … 165 169 166 170 unlockBuffers(ranks) ; 167 info(100)<<"Event "<<timeLine<<" of context "<<context_->getId()<<" sent"<<endl ;168 169 171 checkBuffers(ranks); 172 170 173 } 171 174 … … 346 349 } 347 350 buffer->attachWindows(windows_[rank]) ; 351 if (!isAttachedModeEnabled()) MPI_Barrier(winComm_[rank]) ; 352 348 353 } 349 354 … … 525 530 } 526 531 532 bool CContextClient::havePendingRequests(list<int>& ranks) 533 { 534 list<int>::iterator it; 535 bool pending = false; 536 for (it = ranks.begin(); it != ranks.end(); it++) pending |= buffers[*it]->hasPendingRequest(); 537 return pending; 538 } 539 527 540 bool CContextClient::isNotifiedFinalized(void) 528 541 { -
XIOS/dev/dev_ym/XIOS_COUPLING/src/context_client.hpp
r2259 r2260 41 41 void releaseBuffers(void); 42 42 bool havePendingRequests(void); 43 bool havePendingRequests(list<int>& ranks) ; 43 44 44 45 bool isServerLeader(void) const; … … 127 128 bool isGrowableBuffer_ = true ; 128 129 129 double latency_= 1e-2 ;130 double latency_=0e-2 ; 130 131 }; 131 132 } -
XIOS/dev/dev_ym/XIOS_COUPLING/src/context_server.cpp
r2259 r2260 166 166 MPI_Win_create_dynamic(MPI_INFO_NULL, winComm_[rank], &windows_[rank][1]); 167 167 CTimer::get("create Windows").suspend() ; 168 MPI_Barrier(winComm_[rank]) ; 168 169 } 169 170 else … … 302 303 buffers[rank]->notifyBufferResizing() ; 303 304 buffers[rank]->updateCurrentWindows() ; 305 info(100)<<"Receive NotifyChangeBufferSize from client rank "<<rank<<endl ; 304 306 } 305 307 else if (timeLine==timelineEventChangeBufferSize) … … 310 312 buffers.erase(rank) ; 311 313 buffers.insert(pair<int,CServerBuffer*>(rank,new CServerBuffer(windows_[rank], winAdress, 0, newSize))); 314 info(100)<<"Receive ChangeBufferSize from client rank "<<rank<<" newSize : "<<newSize<<" Address : "<<winAdress[0]<<" & "<<winAdress[1]<<endl ; 312 315 } 313 316 else 314 317 { 318 info(100)<<"Receive standard event from client rank "<<rank<<" with timeLine : "<<timeLine<<endl ; 315 319 it=events.find(timeLine); 316 320 if (it==events.end()) it=events.insert(pair<int,CEventServer*>(timeLine,new CEventServer(this))).first; … … 391 395 else if (pendingRequest.empty()) getBufferFromClient(currentTimeLine) ; 392 396 } 393 else if (p ureOneSided) getBufferFromClient(currentTimeLine) ; // if pure one sided check buffer even if no event recorded at current time line397 else if (pendingRequest.empty()) getBufferFromClient(currentTimeLine) ; // if pure one sided check buffer even if no event recorded at current time line 394 398 } 395 399 -
XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/contexts_manager.cpp
r2258 r2260 155 155 { 156 156 CTimer::get("CContextsManager::eventLoop").resume(); 157 int flag ; 158 MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &flag, MPI_STATUS_IGNORE); 157 159 double time=MPI_Wtime() ; 158 160 if (time-lastEventLoop_ > eventLoopLatency_) -
XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/contexts_manager.hpp
r2246 r2260 83 83 int managerGlobalLeader_ ; 84 84 85 const double eventLoopLatency_= 1e-2;85 const double eventLoopLatency_=0; 86 86 double lastEventLoop_=0. ; 87 87 -
XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/pool_ressource.cpp
r2246 r2260 106 106 107 107 double time=MPI_Wtime() ; 108 int flag ; 109 MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &flag, MPI_STATUS_IGNORE); 108 110 if (time-lastEventLoop_ > eventLoopLatency_) 109 111 { -
XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/pool_ressource.hpp
r2246 r2260 45 45 bool finalizeSignal_ ; 46 46 47 const double eventLoopLatency_= 1e-2;47 const double eventLoopLatency_=0; 48 48 double lastEventLoop_=0. ; 49 49 }; -
XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/ressources_manager.cpp
r2258 r2260 113 113 { 114 114 CTimer::get("CRessourcesManager::eventLoop").resume(); 115 int flag ; 116 MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &flag, MPI_STATUS_IGNORE); 115 117 double time=MPI_Wtime() ; 116 118 if (time-lastEventLoop_ > eventLoopLatency_) -
XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/ressources_manager.hpp
r2246 r2260 72 72 int freeRessourcesSize_ ; 73 73 74 const double eventLoopLatency_= 1e-2;74 const double eventLoopLatency_=0; 75 75 double lastEventLoop_=0. ; 76 76 -
XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/server_context.cpp
r2258 r2260 237 237 CTimer::get("CServerContext::eventLoop").resume(); 238 238 bool finished=false ; 239 239 int flag ; 240 MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &flag, MPI_STATUS_IGNORE); 241 240 242 // double time=MPI_Wtime() ; 241 243 // if (time-lastEventLoop_ > eventLoopLatency_) -
XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/server_context.hpp
r2246 r2260 61 61 bool isAttachedMode_ ; 62 62 63 const double eventLoopLatency_= 1e-2;63 const double eventLoopLatency_=0; 64 64 double lastEventLoop_=0. ; 65 65 -
XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/servers_ressource.cpp
r2246 r2260 118 118 CTimer::get("CServersRessource::eventLoop").resume(); 119 119 double time=MPI_Wtime() ; 120 int flag ; 121 MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &flag, MPI_STATUS_IGNORE); 122 120 123 if (time-lastEventLoop_ > eventLoopLatency_) 121 124 { -
XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/servers_ressource.hpp
r2246 r2260 50 50 bool finalizeSignal_ ; 51 51 52 const double eventLoopLatency_= 1e-2;52 const double eventLoopLatency_=0; 53 53 double lastEventLoop_=0. ; 54 54 -
XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/services.cpp
r2258 r2260 105 105 //checkCreateContextNotification() ; 106 106 CTimer::get("CService::eventLoop").resume(); 107 107 int flag ; 108 MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &flag, MPI_STATUS_IGNORE); 109 108 110 // double time=MPI_Wtime() ; 109 111 // if (time-lastEventLoop_ > eventLoopLatency_) -
XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/services.hpp
r2246 r2260 71 71 int nbPartitions_ ; 72 72 73 const double eventLoopLatency_= 1e-2;73 const double eventLoopLatency_=0; 74 74 double lastEventLoop_=0. ; 75 75 -
XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/services_manager.cpp
r2246 r2260 109 109 { 110 110 CTimer::get("CServicesManager::eventLoop").resume(); 111 int flag ; 112 MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &flag, MPI_STATUS_IGNORE); 111 113 double time=MPI_Wtime() ; 112 114 if (time-lastEventLoop_ > eventLoopLatency_) -
XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/services_manager.hpp
r2246 r2260 60 60 int managerGlobalLeader_ ; 61 61 62 const double eventLoopLatency_= 1e-2;62 const double eventLoopLatency_=0; 63 63 double lastEventLoop_=0. ; 64 64 -
XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/window_manager.hpp
r2258 r2260 61 61 time=MPI_Wtime() ; 62 62 while(time-lastTime < latency_) time=MPI_Wtime() ; 63 int flag ; 64 MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &flag, MPI_STATUS_IGNORE); 63 65 MPI_Win_lock(MPI_LOCK_EXCLUSIVE, rank, 0, window_) ; 64 66 MPI_Compare_and_swap(&WINDOWS_LOCKED, &state, &lock, MPI_INT, rank, OFFSET_LOCK, window_) ; … … 86 88 time=MPI_Wtime() ; 87 89 while(time-lastTime < latency_) time=MPI_Wtime() ; 90 int flag ; 91 MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &flag, MPI_STATUS_IGNORE); 88 92 MPI_Win_lock(MPI_LOCK_EXCLUSIVE, rank, 0, window_) ; 89 93 MPI_Compare_and_swap(&WINDOWS_LOCKED, &state, &lock, MPI_INT, rank, OFFSET_LOCK, window_) ;
Note: See TracChangeset
for help on using the changeset viewer.