Changeset 2661 for XIOS3


Ignore:
Timestamp:
10/04/24 09:58:26 (4 months ago)
Author:
jderouillat
Message:

In case of notifications using MPI_Windows, avoid remote access if information is locally available. Fix a type in notifyOutType_ initialisation on CServices.

Location:
XIOS3/dev/XIOS_NOTIFICATIONS_MANAGER/src/manager
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • XIOS3/dev/XIOS_NOTIFICATIONS_MANAGER/src/manager/contexts_manager.cpp

    r2648 r2661  
    257257    if (commRank==0) 
    258258    { 
    259  
    260       if (useWindowManager_) winContexts_->updateFromSharedWindow(managerGlobalLeader_, this, &CContextsManager::contextsDumpIn) ; 
    261  
    262259      auto it=contexts_.find(fullContextId) ; 
     260      if ( it == contexts_.end()) 
     261      { 
     262        if (useWindowManager_) winContexts_->updateFromSharedWindow(managerGlobalLeader_, this, &CContextsManager::contextsDumpIn) ; 
     263      } 
     264       
     265      it=contexts_.find(fullContextId) ; 
    263266      if ( it == contexts_.end()) ret=false ; 
    264267      else 
  • XIOS3/dev/XIOS_NOTIFICATIONS_MANAGER/src/manager/ressources_manager.cpp

    r2648 r2661  
    338338  bool CRessourcesManager::getPoolInfo(const string& poolId, int& size, int& freeSize, int& leader) 
    339339  { 
    340     if (useWindowManager_) winRessources_->updateFromSharedWindow(managerGlobalLeader_, this, &CRessourcesManager::ressourcesDumpIn) ; 
    341   
    342340    auto it=pools_.find(poolId) ; 
     341    if ( it == pools_.end()) 
     342    { 
     343      if (useWindowManager_) winRessources_->updateFromSharedWindow(managerGlobalLeader_, this, &CRessourcesManager::ressourcesDumpIn) ; 
     344    } 
     345    it=pools_.find(poolId) ; 
    343346    if ( it == pools_.end()) return false ; 
    344347    else 
  • XIOS3/dev/XIOS_NOTIFICATIONS_MANAGER/src/manager/services.cpp

    r2648 r2661  
    3838    {  
    3939      winNotify_ = new CWindowManager(serviceComm_, maxBufferSize_,"CService::winNotify_") ; 
    40       notifyOutType_==NOTIFY_NOTHING ; 
     40      notifyOutType_=NOTIFY_NOTHING ; 
    4141      winNotify_->updateToExclusiveWindow(localRank, this, &CService::notificationsDumpOut) ; 
    4242    } 
  • XIOS3/dev/XIOS_NOTIFICATIONS_MANAGER/src/manager/services_manager.cpp

    r2648 r2661  
    416416                                        int& size, int& nbPartitions, int& leader, bool wait) 
    417417  { 
    418     if (useWindowManager_) winServices_->updateFromSharedWindow(managerGlobalLeader_, this, &CServicesManager::servicesDumpIn) ; 
    419      
    420     if (wait) waitServiceRegistration(poolId, serviceId, partitionId) ; 
    421418    auto it=services_.find(std::tuple<std::string,std::string,int>(poolId,serviceId,partitionId)) ; 
     419    if ( it == services_.end()) 
     420    { 
     421      if (useWindowManager_) winServices_->updateFromSharedWindow(managerGlobalLeader_, this, &CServicesManager::servicesDumpIn) ; 
     422       
     423      if (wait) waitServiceRegistration(poolId, serviceId, partitionId) ; 
     424    } 
     425    it=services_.find(std::tuple<std::string,std::string,int>(poolId,serviceId,partitionId)) ; 
    422426    if ( it == services_.end()) return false ; 
    423427    else 
     
    457461  bool CServicesManager::hasService(const std::string& poolId, const std::string& serviceId, const int& partitionId) 
    458462  { 
    459     if (useWindowManager_) winServices_->updateFromSharedWindow(managerGlobalLeader_, this, &CServicesManager::servicesDumpIn) ; 
    460     auto it=services_.find(std::tuple<std::string, std::string, int>(poolId, serviceId, partitionId)) ; 
     463    auto it=services_.find(std::tuple<std::string,std::string,int>(poolId,serviceId,partitionId)) ; 
     464    if ( it == services_.end()) 
     465    { 
     466      if (useWindowManager_) winServices_->updateFromSharedWindow(managerGlobalLeader_, this, &CServicesManager::servicesDumpIn) ; 
     467    } 
     468    it=services_.find(std::tuple<std::string, std::string, int>(poolId, serviceId, partitionId)) ; 
    461469    if ( it == services_.end()) return false ; 
    462470    else return true ; 
Note: See TracChangeset for help on using the changeset viewer.