Changeset 2580 for XIOS3/trunk/src/manager
- Timestamp:
- 09/26/23 17:24:35 (10 months ago)
- Location:
- XIOS3/trunk/src/manager
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS3/trunk/src/manager/contexts_manager.cpp
r2517 r2580 26 26 27 27 MPI_Comm_rank(xiosComm_, &commRank) ; 28 winNotify_ = new CWindowManager(xiosComm_, maxBufferSize_ ) ;28 winNotify_ = new CWindowManager(xiosComm_, maxBufferSize_,"CContextsManager::winNotify_") ; 29 29 winNotify_->updateToExclusiveWindow(commRank, this, &CContextsManager::notificationsDumpOut) ; 30 30 31 31 32 winContexts_ = new CWindowManager(xiosComm_, maxBufferSize_ ) ;32 winContexts_ = new CWindowManager(xiosComm_, maxBufferSize_,"CContextsManager::winContexts_") ; 33 33 winContexts_->updateToExclusiveWindow(commRank, this, &CContextsManager::contextsDumpOut) ; 34 34 -
XIOS3/trunk/src/manager/coupler_manager.cpp
r2517 r2580 19 19 MPI_Comm_rank(xiosComm_, &commRank) ; 20 20 21 winRegistredCoupling_ = new CWindowManager(xiosComm_, maxBufferSize_ ) ;22 winNextCoupling_ = new CWindowManager(xiosComm_, maxBufferSize_ ) ;21 winRegistredCoupling_ = new CWindowManager(xiosComm_, maxBufferSize_,"CCouplerManager::winRegistredCoupling_") ; 22 winNextCoupling_ = new CWindowManager(xiosComm_, maxBufferSize_,"CCouplerManager::winNextCoupling_") ; 23 23 if (commRank==managerGlobalLeader_) 24 24 { -
XIOS3/trunk/src/manager/pool_ressource.cpp
r2571 r2580 16 16 int commRank, commSize ; 17 17 MPI_Comm_dup(poolComm, &poolComm_) ; 18 winNotify_ = new CWindowManager(poolComm_, maxBufferSize_) ; 18 CXios::getMpiGarbageCollector().registerCommunicator(poolComm_) ; 19 winNotify_ = new CWindowManager(poolComm_, maxBufferSize_,"CPoolRessource::winNotify_") ; 19 20 MPI_Comm_rank(poolComm, &commRank) ; 20 21 MPI_Comm_size(poolComm, &commSize) ; … … 404 405 MPI_Comm newServiceComm ; 405 406 MPI_Comm_dup(serviceComm, &newServiceComm) ; 407 CXios::getMpiGarbageCollector().registerCommunicator(newServiceComm) ; 406 408 int nbPartitions = service.second->getNbPartitions() ; 407 409 int partitionId = service.second->getPartitionId() ; -
XIOS3/trunk/src/manager/ressources_manager.cpp
r2562 r2580 22 22 if (commRank==0 && isXiosServer) MPI_Comm_rank(xiosComm_, &commRank) ; 23 23 else commRank=0 ; 24 tokenManager_ = new CTokenManager(xiosComm_,commRank) ;24 //tokenManager_ = new CTokenManager(xiosComm_,commRank) ; 25 25 26 26 MPI_Allreduce(&commRank, &managerGlobalLeader_, 1, MPI_INT, MPI_SUM, xiosComm_) ; 27 27 28 28 MPI_Comm_rank(xiosComm_, &commRank) ; 29 winNotify_ = new CWindowManager(xiosComm_, maxBufferSize_ ) ;30 31 32 winRessources_ = new CWindowManager(xiosComm_, maxBufferSize_ ) ;29 winNotify_ = new CWindowManager(xiosComm_, maxBufferSize_,"CRessourcesManager::winNotify_") ; 30 31 32 winRessources_ = new CWindowManager(xiosComm_, maxBufferSize_,"CRessourcesManager::winRessources_") ; 33 33 winRessources_->lockWindow(commRank,0) ; 34 34 serverLeader_=-1 ; … … 43 43 delete winNotify_ ; 44 44 delete winRessources_ ; 45 delete tokenManager_ ;45 //delete tokenManager_ ; 46 46 } 47 47 -
XIOS3/trunk/src/manager/ressources_manager.hpp
r2523 r2580 59 59 void registerPoolClient(const std::string& poolId,int size,int leader) ; 60 60 void registerPoolServer(const std::string& poolId,int size,int leader) ; 61 CTokenManager* getTokenManager(void) {return tokenManager_ ;}61 //CTokenManager* getTokenManager(void) {return tokenManager_ ;} 62 62 63 63 int managerGlobalLeader_ ; … … 66 66 67 67 CWindowManager* winNotify_ ; 68 CTokenManager* tokenManager_ ;68 //CTokenManager* tokenManager_ ; 69 69 70 70 const size_t maxBufferSize_=1024*1024 ; -
XIOS3/trunk/src/manager/server_context.cpp
r2547 r2580 24 24 25 25 MPI_Comm_dup(contextComm, &contextComm_) ; 26 CXios::getMpiGarbageCollector().registerCommunicator(contextComm_) ; 26 27 xiosComm_=CXios::getXiosComm() ; 27 28 … … 29 30 MPI_Comm_rank(contextComm_,&localRank) ; 30 31 31 winNotify_ = new CWindowManager(contextComm_, maxBufferSize_ ) ;32 winNotify_ = new CWindowManager(contextComm_, maxBufferSize_,"CServerContext::winNotify_") ; 32 33 MPI_Barrier(contextComm_) ; 33 34 … … 57 58 CServerContext::~CServerContext() 58 59 { 60 delete winNotify_ ; 59 61 cout<<"Server Context destructor"<<endl; 60 62 } … … 126 128 { 127 129 MPI_Intercomm_create(intraComm, 0, xiosComm_, contextLeader, 3141, &interCommClient) ; 130 CXios::getMpiGarbageCollector().registerCommunicator(interCommClient) ; 128 131 MPI_Comm_dup(interCommClient, &interCommServer) ; 132 CXios::getMpiGarbageCollector().registerCommunicator(interCommServer) ; 129 133 MPI_Comm_free(&newInterCommClient) ; 130 134 MPI_Comm_free(&newInterCommServer) ; … … 315 319 info(10)<<"CServerContext::createIntercomm : No overlap ==> context in server mode"<<endl ; 316 320 MPI_Intercomm_create(contextComm_, 0, xiosComm_, remoteLeader, 3141, &interCommServer) ; 321 CXios::getMpiGarbageCollector().registerCommunicator(interCommServer) ; 317 322 MPI_Comm_dup(interCommServer,&interCommClient) ; 323 CXios::getMpiGarbageCollector().registerCommunicator(interCommClient) ; 318 324 context_ -> createClientInterComm(interCommClient,interCommServer) ; 319 325 clientsInterComm_.push_back(interCommClient) ; … … 329 335 void CServerContext::freeComm(void) 330 336 { 331 delete winNotify_ ;332 winNotify_=nullptr ;333 MPI_Comm_free(&contextComm_) ;337 //delete winNotify_ ; 338 //winNotify_=nullptr ; 339 //MPI_Comm_free(&contextComm_) ; 334 340 // don't forget intercomm -> later 335 341 } -
XIOS3/trunk/src/manager/servers_ressource.cpp
r2547 r2580 23 23 24 24 MPI_Comm_dup(serverComm, &serverComm_) ; 25 CXios::getMpiGarbageCollector().registerCommunicator(serverComm_) ; 25 26 MPI_Comm xiosComm=CXios::getXiosComm() ; 26 27 … … 29 30 MPI_Comm_rank(serverComm_,&localRank) ; 30 31 31 winNotify_ = new CWindowManager(serverComm_, maxBufferSize_ ) ;32 winNotify_ = new CWindowManager(serverComm_, maxBufferSize_,"CServersRessource::winNotify_") ; 32 33 MPI_Barrier(serverComm_) ; 33 34 if (localRank==localLeader_) … … 42 43 43 44 MPI_Comm_dup(serverComm_, &freeRessourcesComm_) ; 45 CXios::getMpiGarbageCollector().registerCommunicator(freeRessourcesComm_) ; 44 46 eventScheduler_ = make_shared<CEventScheduler>(freeRessourcesComm_) ; 45 47 freeRessourceEventScheduler_ = eventScheduler_ ; -
XIOS3/trunk/src/manager/services.cpp
r2547 r2580 22 22 23 23 MPI_Comm_dup(serviceComm, &serviceComm_) ; 24 CXios::getMpiGarbageCollector().registerCommunicator(serviceComm_) ; 24 25 MPI_Comm globalComm_=CXios::getXiosComm() ; 25 26 … … 27 28 MPI_Comm_rank(serviceComm_,&localRank) ; 28 29 29 winNotify_ = new CWindowManager(serviceComm_, maxBufferSize_ ) ;30 winNotify_ = new CWindowManager(serviceComm_, maxBufferSize_,"CService::winNotify_") ; 30 31 winNotify_->updateToExclusiveWindow(localRank, this, &CService::createContextDumpOut) ; 31 32 MPI_Barrier(serviceComm_) ; -
XIOS3/trunk/src/manager/services_manager.cpp
r2523 r2580 30 30 31 31 MPI_Comm_rank(xiosComm_, &commRank) ; 32 winNotify_ = new CWindowManager(xiosComm_, maxBufferSize_ ) ;32 winNotify_ = new CWindowManager(xiosComm_, maxBufferSize_,"CServicesManager::winNotify_") ; 33 33 winNotify_->updateToExclusiveWindow(commRank, this, &CServicesManager::notificationsDumpOut) ; 34 34 35 winServices_ = new CWindowManager(xiosComm_, maxBufferSize_ ) ;35 winServices_ = new CWindowManager(xiosComm_, maxBufferSize_,"CServicesManager::winServices_") ; 36 36 winServices_->updateToExclusiveWindow(commRank, this, &CServicesManager::servicesDumpOut) ; 37 37 -
XIOS3/trunk/src/manager/window_base.cpp
r2570 r2580 4 4 namespace xios 5 5 { 6 CWindowBase::CWindowBase(MPI_Comm winComm, size_t bufferSize )6 CWindowBase::CWindowBase(MPI_Comm winComm, size_t bufferSize, const string name) : name_(name) 7 7 { 8 8 bufferSize_ = bufferSize ; … … 13 13 lock=0 ; 14 14 MPI_Win_lock_all(0, window_) ; 15 info(100)<<"CWindowBase constructor : "<<name_<<endl ; 15 16 MPI_Barrier(winComm) ; 16 17 } -
XIOS3/trunk/src/manager/window_base.hpp
r2570 r2580 3 3 4 4 #include <map> 5 #include <string> 6 5 7 #include "exception.hpp" 6 8 #include "mpi.hpp" 9 #include <string> 7 10 8 11 namespace xios … … 21 24 const double maxLatency_ = 1e-3 ; // 1ms latency maximum 22 25 MPI_Win window_ ; 26 std::string name_ ; 23 27 24 28 public : 25 29 26 CWindowBase(MPI_Comm winComm, size_t bufferSize );30 CWindowBase(MPI_Comm winComm, size_t bufferSize, const string name); 27 31 28 32 bool tryLockExclusive(int rank) … … 143 147 { 144 148 MPI_Win_unlock_all(window_); 149 info(100)<<"CWindowBase destructor : "<<name_<<endl ; 145 150 } 146 151 -
XIOS3/trunk/src/manager/window_manager.hpp
r2517 r2580 31 31 public : 32 32 33 CWindowManager(MPI_Comm winComm, size_t bufferSize ) : CWindowBase(winComm, bufferSize + OFFSET_BUFFER_SIZE)33 CWindowManager(MPI_Comm winComm, size_t bufferSize, const string name) : CWindowBase(winComm, bufferSize + OFFSET_BUFFER_SIZE, name) 34 34 { 35 35 int lock=0 ;
Note: See TracChangeset
for help on using the changeset viewer.