Changeset 2517 for XIOS3/trunk/src/manager/services_manager.cpp
- Timestamp:
- 06/12/23 11:52:10 (13 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS3/trunk/src/manager/services_manager.cpp
r2507 r2517 31 31 MPI_Comm_rank(xiosComm_, &commRank) ; 32 32 winNotify_ = new CWindowManager(xiosComm_, maxBufferSize_) ; 33 winNotify_->lockWindow(commRank,0) ; 34 winNotify_->updateToWindow(commRank, this, &CServicesManager::notificationsDumpOut) ; 35 winNotify_->unlockWindow(commRank,0) ; 33 winNotify_->updateToExclusiveWindow(commRank, this, &CServicesManager::notificationsDumpOut) ; 36 34 37 35 winServices_ = new CWindowManager(xiosComm_, maxBufferSize_) ; 38 winServices_->lockWindow(commRank,0) ; 39 winServices_->updateToWindow(commRank, this, &CServicesManager::servicesDumpOut) ; 40 winServices_->unlockWindow(commRank,0) ; 41 36 winServices_->updateToExclusiveWindow(commRank, this, &CServicesManager::servicesDumpOut) ; 37 42 38 MPI_Barrier(xiosComm_) ; 43 39 } … … 121 117 void CServicesManager::sendNotification(int rank) 122 118 { 123 winNotify_->lockWindowExclusive(rank) ; 124 winNotify_->pushToLockedWindow(rank, this, &CServicesManager::notificationsDumpOut) ; 125 winNotify_->unlockWindow(rank) ; 119 winNotify_->pushToExclusiveWindow(rank, this, &CServicesManager::notificationsDumpOut) ; 126 120 } 127 121 … … 147 141 int commRank ; 148 142 MPI_Comm_rank(xiosComm_, &commRank) ; 149 winNotify_->lockWindowExclusive(commRank) ; 150 winNotify_->popFromLockedWindow(commRank, this, &CServicesManager::notificationsDumpIn) ; 151 winNotify_->unlockWindow(commRank) ; 143 winNotify_->popFromExclusiveWindow(commRank, this, &CServicesManager::notificationsDumpIn) ; 152 144 if (notifyType_==NOTIFY_CREATE_SERVICE) createService() ; 153 145 else if (notifyType_==NOTIFY_CREATE_SERVICE_ONTO) createServiceOnto() ; … … 253 245 services_[std::tuple<std::string, std::string,int>(poolId,serviceId,partitionId)]=std::make_tuple(type,size,nbPartitions,leader) ; 254 246 winServices_->updateToLockedWindow(managerGlobalLeader_, this, &CServicesManager::servicesDumpOut) ; 255 winServices_->unlockWindow (managerGlobalLeader_) ;247 winServices_->unlockWindowExclusive(managerGlobalLeader_) ; 256 248 257 249 } … … 260 252 int& size, int& nbPartitions, int& leader, bool wait) 261 253 { 262 winServices_->lockWindowShared(managerGlobalLeader_) ; 263 winServices_->updateFromLockedWindow(managerGlobalLeader_, this, &CServicesManager::servicesDumpIn) ; 264 winServices_->unlockWindow(managerGlobalLeader_) ; 254 winServices_->updateFromSharedWindow(managerGlobalLeader_, this, &CServicesManager::servicesDumpIn) ; 265 255 266 256 if (wait) waitServiceRegistration(poolId, serviceId, partitionId) ; … … 303 293 bool CServicesManager::hasService(const std::string& poolId, const std::string& serviceId, const int& partitionId) 304 294 { 305 winServices_->lockWindowShared(managerGlobalLeader_) ; 306 winServices_->updateFromLockedWindow(managerGlobalLeader_, this, &CServicesManager::servicesDumpIn) ; 307 winServices_->unlockWindow(managerGlobalLeader_) ; 295 winServices_->updateFromSharedWindow(managerGlobalLeader_, this, &CServicesManager::servicesDumpIn) ; 308 296 auto it=services_.find(std::tuple<std::string, std::string, int>(poolId, serviceId, partitionId)) ; 309 297 if ( it == services_.end()) return false ;
Note: See TracChangeset
for help on using the changeset viewer.