Changeset 2123 for XIOS/dev/dev_ym/XIOS_COUPLING/src/context_server.cpp
- Timestamp:
- 04/02/21 21:06:04 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_ym/XIOS_COUPLING/src/context_server.cpp
r2022 r2123 54 54 // if (contextInfo.serviceType != CServicesManager::CLIENT) // we must have an event scheduler => to be retrieve from the associated services 55 55 // { 56 if (!isAttachedModeEnabled()) eventScheduler_=CXios::getPoolRessource()->getService(contextInfo.serviceId,contextInfo.partitionId)->getEventScheduler() ; 56 //if (!isAttachedModeEnabled()) eventScheduler_=CXios::getPoolRessource()->getService(contextInfo.serviceId,contextInfo.partitionId)->getEventScheduler() ; 57 eventScheduler_=CXios::getPoolRessource()->getService(contextInfo.serviceId,contextInfo.partitionId)->getEventScheduler() ; 58 57 59 // } 58 60 … … 316 318 if (event->isFull()) 317 319 { 318 if (!scheduled && eventScheduler_) // Skip event scheduling for attached mode and reception on client side320 if (!scheduled && !isAttachedModeEnabled()) // Skip event scheduling for attached mode and reception on client side 319 321 { 320 322 eventScheduler_->registerEvent(currentTimeLine,hashId); 321 323 scheduled=true; 322 324 } 323 else if ( !eventScheduler_|| eventScheduler_->queryEvent(currentTimeLine,hashId) )325 else if (isAttachedModeEnabled() || eventScheduler_->queryEvent(currentTimeLine,hashId) ) 324 326 { 325 MPI_Barrier(intraComm) ; 327 MPI_Request req ; 328 MPI_Status status ; 329 330 MPI_Ibarrier(intraComm,&req) ; 331 int flag=false ; 332 do 333 { 334 eventScheduler_->checkEvent() ; 335 MPI_Test(&req,&flag,&status) ; 336 } while (!flag) ; 337 338 //MPI_Barrier(intraComm) ; 326 339 // When using attached mode, synchronise the processes to avoid that differents event be scheduled by differents processes 327 340 // The best way to properly solve this problem will be to use the event scheduler also in attached mode
Note: See TracChangeset
for help on using the changeset viewer.