- Timestamp:
- 10/11/21 14:41:56 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/ressources_manager.cpp
r1764 r2246 2 2 #include "server.hpp" 3 3 #include "servers_ressource.hpp" 4 #include "timer.hpp" 4 5 5 6 … … 43 44 void CRessourcesManager::createPool(const string& poolId, int size) 44 45 { 46 info(40)<<"CRessourcesManager::createPool : calling createPool : "<<poolId<<" of size"<<size<<endl ; 47 info(40)<<"send notification to leader : "<<serverLeader_<<endl ; 45 48 winRessources_->lockWindow(managerGlobalLeader_,0) ; 46 49 winRessources_->updateFromWindow(managerGlobalLeader_, this, &CRessourcesManager::ressourcesDumpIn) ; … … 49 52 notifyType_=NOTIFY_CREATE_POOL ; 50 53 notifyCreatePool_=make_tuple(poolId, size) ; 54 info(40)<<"CRessourcesManager::createPool : send notification creating pool to server leader "<<serverLeader_<<endl ; 51 55 sendNotification(serverLeader_) ; 52 56 } … … 61 65 { 62 66 notifyType_=NOTIFY_FINALIZE ; 67 info(40)<<"CRessourcesManager::finalize : send notification finalize to server leader "<<serverLeader_<<endl ; 63 68 sendNotification(serverLeader_) ; 64 69 } … … 107 112 void CRessourcesManager::eventLoop(void) 108 113 { 109 checkNotifications() ; 114 CTimer::get("CRessourcesManager::eventLoop").resume(); 115 double time=MPI_Wtime() ; 116 if (time-lastEventLoop_ > eventLoopLatency_) 117 { 118 checkNotifications() ; 119 lastEventLoop_=time ; 120 } 121 122 CTimer::get("CRessourcesManager::eventLoop").suspend(); 110 123 } 111 124 … … 114 127 int commRank ; 115 128 MPI_Comm_rank(xiosComm_, &commRank) ; 129 CTimer::get("CRessourcesManager::checkNotifications lock").resume(); 116 130 winNotify_->lockWindow(commRank,0) ; 131 CTimer::get("CRessourcesManager::checkNotifications lock").suspend(); 132 CTimer::get("CRessourcesManager::checkNotifications pop").resume(); 117 133 winNotify_->popFromWindow(commRank, this, &CRessourcesManager::notificationsDumpIn) ; 134 CTimer::get("CRessourcesManager::checkNotifications pop").suspend(); 135 CTimer::get("CRessourcesManager::checkNotifications unlock").resume(); 118 136 winNotify_->unlockWindow(commRank,0) ; 137 CTimer::get("CRessourcesManager::checkNotifications unlock").suspend(); 119 138 if (notifyType_==NOTIFY_CREATE_POOL) createPool() ; 120 139 else if (notifyType_==NOTIFY_FINALIZE) finalizeSignal() ; … … 123 142 void CRessourcesManager::createPool(void) 124 143 { 144 125 145 auto& arg=notifyCreatePool_ ; 126 146 string poolId=get<0>(arg) ; 127 147 int size=get<1>(arg) ; 148 info(40)<<"CRessourcesManager::createPool : receive create pool notification : "<< poolId<<" of size "<<size<<endl ; 128 149 CServer::getServersRessource()->createPool(poolId,size) ; 129 150 } … … 131 152 void CRessourcesManager::finalizeSignal(void) 132 153 { 154 info(40)<<"CRessourcesManager::createPool : receive finalize notification"<<endl ; 133 155 CServer::getServersRessource()->finalize() ; 134 156 }
Note: See TracChangeset
for help on using the changeset viewer.