Ignore:
Timestamp:
10/11/21 14:41:56 (3 years ago)
Author:
ymipsl
Message:
  • Update of the tranfer protocol using one sided communication
  • Introduce MPI_Improb/MPI_mrecv to listen incomming request
  • Introducing latency when looping over managers

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/ressources_manager.cpp

    r1764 r2246  
    22#include "server.hpp" 
    33#include "servers_ressource.hpp" 
     4#include "timer.hpp" 
    45 
    56 
     
    4344  void CRessourcesManager::createPool(const string& poolId, int size) 
    4445  { 
     46    info(40)<<"CRessourcesManager::createPool : calling createPool : "<<poolId<<"  of size"<<size<<endl ; 
     47    info(40)<<"send notification to leader : "<<serverLeader_<<endl ; 
    4548    winRessources_->lockWindow(managerGlobalLeader_,0) ; 
    4649    winRessources_->updateFromWindow(managerGlobalLeader_, this, &CRessourcesManager::ressourcesDumpIn) ; 
     
    4952    notifyType_=NOTIFY_CREATE_POOL ; 
    5053    notifyCreatePool_=make_tuple(poolId, size) ; 
     54    info(40)<<"CRessourcesManager::createPool : send notification creating pool to server leader "<<serverLeader_<<endl ; 
    5155    sendNotification(serverLeader_) ;  
    5256  } 
     
    6165    { 
    6266      notifyType_=NOTIFY_FINALIZE ; 
     67      info(40)<<"CRessourcesManager::finalize : send notification finalize to server leader "<<serverLeader_<<endl ; 
    6368      sendNotification(serverLeader_) ; 
    6469    }  
     
    107112  void CRessourcesManager::eventLoop(void) 
    108113  { 
    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(); 
    110123  } 
    111124   
     
    114127    int commRank ; 
    115128    MPI_Comm_rank(xiosComm_, &commRank) ; 
     129    CTimer::get("CRessourcesManager::checkNotifications lock").resume(); 
    116130    winNotify_->lockWindow(commRank,0) ; 
     131    CTimer::get("CRessourcesManager::checkNotifications lock").suspend(); 
     132    CTimer::get("CRessourcesManager::checkNotifications pop").resume(); 
    117133    winNotify_->popFromWindow(commRank, this, &CRessourcesManager::notificationsDumpIn) ; 
     134    CTimer::get("CRessourcesManager::checkNotifications pop").suspend(); 
     135    CTimer::get("CRessourcesManager::checkNotifications unlock").resume(); 
    118136    winNotify_->unlockWindow(commRank,0) ; 
     137    CTimer::get("CRessourcesManager::checkNotifications unlock").suspend(); 
    119138    if (notifyType_==NOTIFY_CREATE_POOL) createPool() ; 
    120139    else if (notifyType_==NOTIFY_FINALIZE) finalizeSignal() ; 
     
    123142  void CRessourcesManager::createPool(void) 
    124143  { 
     144     
    125145    auto& arg=notifyCreatePool_ ; 
    126146    string poolId=get<0>(arg) ; 
    127147    int size=get<1>(arg) ; 
     148    info(40)<<"CRessourcesManager::createPool : receive create pool notification : "<< poolId<<"  of size "<<size<<endl ; 
    128149    CServer::getServersRessource()->createPool(poolId,size) ; 
    129150  }  
     
    131152  void CRessourcesManager::finalizeSignal(void) 
    132153  { 
     154    info(40)<<"CRessourcesManager::createPool : receive finalize notification"<<endl ; 
    133155    CServer::getServersRessource()->finalize() ; 
    134156  } 
Note: See TracChangeset for help on using the changeset viewer.