- Timestamp:
- 12/01/21 14:29:36 (3 years ago)
- Location:
- XIOS/dev/dev_ym/XIOS_COUPLING/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_ym/XIOS_COUPLING/src/client.cpp
r2265 r2266 487 487 CTimer::get("XIOS init/finalize",false).suspend() ; 488 488 CTimer::get("XIOS").suspend() ; 489 CXios::finalizeDaemonsManager() ; 489 490 CContext::removeAllContexts() ; // free memory for related context 490 CXios::finalizeDaemonsManager() ;491 491 492 492 493 if (!is_MPI_Initialized) -
XIOS/dev/dev_ym/XIOS_COUPLING/src/interface/c/icdata.cpp
r2265 r2266 135 135 CContext* context = CContext::getCurrent(); 136 136 context->finalize(); 137 C Context::removeContext(context->getId()) ;137 CXios::getDaemonsManager()->eventLoop() ; 138 138 CTimer::get("XIOS context finalize").suspend(); 139 139 CTimer::get("XIOS").suspend(); -
XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/daemons_manager.cpp
r2246 r2266 32 32 CDaemonsManager::~CDaemonsManager() 33 33 { 34 CXios::finalizeContextsManager() ; 35 CXios::finalizeCouplerManager() ; 36 CXios::finalizeServicesManager() ; 37 CXios::finalizeRessourcesManager() ; 38 CXios::finalizeRegistryManager() ; 34 finalize() ; 39 35 } 40 36 … … 58 54 } 59 55 56 bool CDaemonsManager::finalize(void) 57 { 58 if (!isFinalized_) 59 { 60 if (isServer_) CServer::getServersRessource()->finalizeSignal() ; 61 else CXios::getPoolRessource()->finalizeSignal() ; 62 while(!eventLoop()) ; 63 MPI_Barrier( CXios::getXiosComm()) ; 64 CXios::finalizeContextsManager() ; 65 CXios::finalizeCouplerManager() ; 66 CXios::finalizeServicesManager() ; 67 CXios::finalizeRessourcesManager() ; 68 CXios::finalizeRegistryManager() ; 69 isFinalized_=true ; 70 } 71 } 72 60 73 } -
XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/daemons_manager.hpp
r2130 r2266 20 20 bool isScheduledContext(size_t hashId) { return scheduledContext_==hashId ;} //!< for attached mode, return true if context server is sceduled 21 21 void unscheduleContext(void) { scheduledContext_=0 ;} //!< for attached mode : unschedule context 22 22 bool finalize(void) ; 23 23 private: 24 24 bool isServer_ ; 25 25 size_t scheduledContext_ = 0 ; //!< Hash id of the next scehduled context for attached mode 26 bool isFinalized_=false ; 26 27 } ; 27 28 } -
XIOS/dev/dev_ym/XIOS_COUPLING/src/server.cpp
r2265 r2266 313 313 314 314 // MPI_Comm_free(&intraComm); 315 CXios::finalizeDaemonsManager(); 315 316 CContext::removeAllContexts() ; // free memory for related context 316 CXios::finalizeDaemonsManager();317 317 318 318 if (!is_MPI_Initialized)
Note: See TracChangeset
for help on using the changeset viewer.