Changeset 2628 for XIOS3/trunk/src/manager
- Timestamp:
- 04/03/24 10:33:55 (3 months ago)
- Location:
- XIOS3/trunk/src/manager
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS3/trunk/src/manager/contexts_manager.cpp
r2613 r2628 14 14 { 15 15 using namespace std ; 16 extern CLogType logTimers ; 16 17 17 18 CContextsManager::CContextsManager(bool isXiosServer) … … 153 154 void CContextsManager::eventLoop(void) 154 155 { 155 CTimer::get("CContextsManager::eventLoop").resume();156 if (info.isActive(logTimers)) CTimer::get("CContextsManager::eventLoop").resume(); 156 157 int flag ; 157 158 MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &flag, MPI_STATUS_IGNORE); … … 162 163 lastEventLoop_=time ; 163 164 } 164 CTimer::get("CContextsManager::eventLoop").suspend();165 if (info.isActive(logTimers)) CTimer::get("CContextsManager::eventLoop").suspend(); 165 166 } 166 167 -
XIOS3/trunk/src/manager/pool_ressource.cpp
r2589 r2628 12 12 namespace xios 13 13 { 14 extern CLogType logTimers ; 15 14 16 CPoolRessource::CPoolRessource(MPI_Comm poolComm, shared_ptr<CEventScheduler> eventScheduler, const std::string& Id, bool isServer) : Id_(Id), finalizeSignal_(false) 15 17 { … … 237 239 bool CPoolRessource::eventLoop(bool serviceOnly) 238 240 { 239 CTimer::get("CPoolRessource::eventLoop").resume();241 if (info.isActive(logTimers)) CTimer::get("CPoolRessource::eventLoop").resume(); 240 242 241 243 double time=MPI_Wtime() ; … … 259 261 } 260 262 } 261 CTimer::get("CPoolRessource::eventLoop").suspend();263 if (info.isActive(logTimers)) CTimer::get("CPoolRessource::eventLoop").suspend(); 262 264 if (services_.empty() && finalizeSignal_) finished_=true ; 263 265 return finished_ ; … … 266 268 void CPoolRessource::threadEventLoop(void) 267 269 { 268 CTimer::get("CPoolRessource::eventLoop").resume();270 if (info.isActive(logTimers)) CTimer::get("CPoolRessource::eventLoop").resume(); 269 271 info(100)<<"Launch Thread for CPoolRessource::threadEventLoop, pool id = "<<Id_<<endl ; 270 272 CThreadManager::threadInitialize() ; … … 294 296 } 295 297 296 CTimer::get("CPoolRessource::eventLoop").suspend();297 298 if (services_.empty() && finalizeSignal_) finished_=true ; 298 299 … … 302 303 303 304 CThreadManager::threadFinalize() ; 305 if (info.isActive(logTimers)) CTimer::get("CPoolRessource::eventLoop").suspend(); 304 306 info(100)<<"Close thread for CPoolRessource::threadEventLoop, pool id = "<<Id_<<endl ; 305 307 } -
XIOS3/trunk/src/manager/ressources_manager.cpp
r2580 r2628 12 12 { 13 13 using namespace std; 14 extern CLogType logTimers ; 14 15 15 16 CRessourcesManager::CRessourcesManager(bool isXiosServer) … … 112 113 void CRessourcesManager::eventLoop(void) 113 114 { 114 CTimer::get("CRessourcesManager::eventLoop").resume();115 if (info.isActive(logTimers)) CTimer::get("CRessourcesManager::eventLoop").resume(); 115 116 int flag ; 116 117 MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &flag, MPI_STATUS_IGNORE); … … 122 123 } 123 124 124 CTimer::get("CRessourcesManager::eventLoop").suspend();125 if (info.isActive(logTimers)) CTimer::get("CRessourcesManager::eventLoop").suspend(); 125 126 } 126 127 … … 129 130 int commRank ; 130 131 MPI_Comm_rank(xiosComm_, &commRank) ; 131 CTimer::get("CRessourcesManager::checkNotifications lock").resume();132 if (info.isActive(logTimers)) CTimer::get("CRessourcesManager::checkNotifications lock").resume(); 132 133 winNotify_->lockWindowExclusive(commRank) ; 133 CTimer::get("CRessourcesManager::checkNotifications lock").suspend();134 CTimer::get("CRessourcesManager::checkNotifications pop").resume();134 if (info.isActive(logTimers)) CTimer::get("CRessourcesManager::checkNotifications lock").suspend(); 135 if (info.isActive(logTimers)) CTimer::get("CRessourcesManager::checkNotifications pop").resume(); 135 136 winNotify_->popFromLockedWindow(commRank, this, &CRessourcesManager::notificationsDumpIn) ; 136 CTimer::get("CRessourcesManager::checkNotifications pop").suspend();137 CTimer::get("CRessourcesManager::checkNotifications unlock").resume();137 if (info.isActive(logTimers)) CTimer::get("CRessourcesManager::checkNotifications pop").suspend(); 138 if (info.isActive(logTimers)) CTimer::get("CRessourcesManager::checkNotifications unlock").resume(); 138 139 winNotify_->unlockWindowExclusive(commRank) ; 139 CTimer::get("CRessourcesManager::checkNotifications unlock").suspend();140 if (info.isActive(logTimers)) CTimer::get("CRessourcesManager::checkNotifications unlock").suspend(); 140 141 if (notifyType_==NOTIFY_CREATE_POOL) createPool() ; 141 142 else if (notifyType_==NOTIFY_FINALIZE) finalizeSignal() ; -
XIOS3/trunk/src/manager/server_context.cpp
r2589 r2628 13 13 { 14 14 using namespace std ; 15 extern CLogType logTimers ; 15 16 16 17 map<string, tuple<bool,MPI_Comm,MPI_Comm> > CServerContext::overlapedComm_ ; … … 233 234 bool CServerContext::eventLoop(bool serviceOnly) 234 235 { 235 CTimer::get("CServerContext::eventLoop").resume();236 if (info.isActive(logTimers)) CTimer::get("CServerContext::eventLoop").resume(); 236 237 bool finished=false ; 237 238 int flag ; … … 256 257 } 257 258 } 258 CTimer::get("CServerContext::eventLoop").suspend();259 if (info.isActive(logTimers)) CTimer::get("CServerContext::eventLoop").suspend(); 259 260 if (context_==nullptr && finalizeSignal_) finished=true ; 260 261 return finished ; … … 264 265 { 265 266 267 if (info.isActive(logTimers)) CTimer::get("CServerContext::eventLoop").resume(); 266 268 info(100)<<"Launch Thread for CServerContext::threadEventLoop, context id = "<<context_->getId()<<endl ; 267 269 CThreadManager::threadInitialize() ; 268 270 do 269 271 { 270 CTimer::get("CServerContext::eventLoop").resume();271 272 int flag ; 272 273 MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &flag, MPI_STATUS_IGNORE); … … 285 286 } 286 287 } 287 CTimer::get("CServerContext::eventLoop").suspend();288 288 if (context_==nullptr && finalizeSignal_) finished_=true ; 289 289 … … 294 294 CThreadManager::threadFinalize() ; 295 295 info(100)<<"Close thread for CServerContext::threadEventLoop"<<endl ; 296 if (info.isActive(logTimers)) CTimer::get("CServerContext::eventLoop").suspend(); 296 297 } 297 298 -
XIOS3/trunk/src/manager/servers_ressource.cpp
r2604 r2628 18 18 { 19 19 using namespace std ; 20 extern CLogType logTimers ; 20 21 21 22 CServersRessource::CServersRessource(MPI_Comm serverComm) : poolRessource_(nullptr), finalizeSignal_(false) … … 122 123 bool CServersRessource::eventLoop(bool serviceOnly) 123 124 { 124 CTimer::get("CServersRessource::eventLoop").resume();125 if (info.isActive(logTimers)) CTimer::get("CServersRessource::eventLoop").resume(); 125 126 double time=MPI_Wtime() ; 126 127 int flag ; … … 143 144 } 144 145 } 145 CTimer::get("CServersRessource::eventLoop").suspend();146 if (info.isActive(logTimers)) CTimer::get("CServersRessource::eventLoop").suspend(); 146 147 if (poolRessource_==nullptr && finalizeSignal_) finished_=true ; 147 148 return finished_ ; … … 150 151 void CServersRessource::threadEventLoop(void) 151 152 { 152 CTimer::get("CServersRessource::eventLoop").resume();153 if (info.isActive(logTimers)) CTimer::get("CServersRessource::eventLoop").resume(); 153 154 info(100)<<"Launch Thread for CServersRessource::threadEventLoop"<<endl ; 154 155 CThreadManager::threadInitialize() ; … … 175 176 } 176 177 } 177 CTimer::get("CServersRessource::eventLoop").suspend();178 178 if (poolRessource_==nullptr && finalizeSignal_) finished_=true ; 179 179 if (!finished_) CThreadManager::yield() ; … … 182 182 183 183 CThreadManager::threadFinalize() ; 184 if (info.isActive(logTimers)) CTimer::get("CServersRessource::eventLoop").suspend(); 184 185 info(100)<<"Close thread for CServersRessource::threadEventLoop"<<endl ; ; 185 186 } -
XIOS3/trunk/src/manager/services.cpp
r2589 r2628 10 10 namespace xios 11 11 { 12 extern CLogType logTimers ; 13 12 14 CService::CService(MPI_Comm serviceComm, shared_ptr<CEventScheduler> eventScheduler, const std::string& poolId, const std::string& serviceId, const int& partitionId, 13 15 int type, int nbPartitions) … … 115 117 { 116 118 //checkCreateContextNotification() ; 117 CTimer::get("CService::eventLoop").resume();119 if (info.isActive(logTimers)) CTimer::get("CService::eventLoop").resume(); 118 120 int flag ; 119 121 MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &flag, MPI_STATUS_IGNORE); … … 140 142 } 141 143 142 CTimer::get("CService::eventLoop").suspend();144 if (info.isActive(logTimers)) CTimer::get("CService::eventLoop").suspend(); 143 145 if (contexts_.empty() && finalizeSignal_) return true ; 144 146 else return false ; … … 147 149 void CService::threadEventLoop(void) 148 150 { 151 if (info.isActive(logTimers)) CTimer::get("CService::eventLoop").resume(); 149 152 info(100)<<"Launch Thread for CService::threadEventLoop, service id = "<<name_<<endl ; 150 153 CThreadManager::threadInitialize() ; … … 152 155 do 153 156 { 154 CTimer::get("CService::eventLoop").resume();155 157 int flag ; 156 158 MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &flag, MPI_STATUS_IGNORE); … … 177 179 } 178 180 179 CTimer::get("CService::eventLoop").suspend();180 181 if (contexts_.empty() && finalizeSignal_) finished_=true ; 181 182 if (!finished_) CThreadManager::yield() ; … … 184 185 CThreadManager::threadFinalize() ; 185 186 info(100)<<"Close thread for CService::threadEventLoop, service id = "<<name_<<endl ; 187 if (info.isActive(logTimers)) CTimer::get("CService::eventLoop").suspend(); 186 188 } 187 189 -
XIOS3/trunk/src/manager/services_manager.cpp
r2580 r2628 11 11 namespace xios 12 12 { 13 13 extern CLogType logTimers ; 14 14 15 15 … … 123 123 void CServicesManager::eventLoop(void) 124 124 { 125 CTimer::get("CServicesManager::eventLoop").resume();125 if (info.isActive(logTimers)) CTimer::get("CServicesManager::eventLoop").resume(); 126 126 int flag ; 127 127 MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &flag, MPI_STATUS_IGNORE); … … 132 132 lastEventLoop_=time ; 133 133 } 134 CTimer::get("CServicesManager::eventLoop").suspend();134 if (info.isActive(logTimers)) CTimer::get("CServicesManager::eventLoop").suspend(); 135 135 } 136 136
Note: See TracChangeset
for help on using the changeset viewer.