Changeset 1764


Ignore:
Timestamp:
11/05/19 16:02:34 (2 years ago)
Author:
ymipsl
Message:

Some Update on XIOS services
Seems to work on Irène for :

  • first level of servers
  • fisrt + second level of servers
  • attached mode

YM

Location:
XIOS/dev/dev_ym/XIOS_SERVICES/src
Files:
27 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_ym/XIOS_SERVICES/src/client.cpp

    r1761 r1764  
    355355      CXios::setXiosComm(xiosGlobalComm) ; 
    356356 
     357      MPI_Comm commUnfree ; 
     358      MPI_Comm_dup(clientComm, &commUnfree ) ; 
     359  
    357360    } 
    358361 
     
    732735      CTimer::get("XIOS init/finalize",false).suspend() ; 
    733736      CTimer::get("XIOS").suspend() ; 
     737       
     738      CXios::finalizeDaemonsManager() ; 
     739 
    734740      if (!is_MPI_Initialized) 
    735741      { 
     
    748754      report(0)<< " Memory report : increasing it by a factor will increase performance, depending of the volume of data wrote in file at each time step of the file"<<endl ; 
    749755      report(100)<<CTimer::getAllCumulatedTime()<<endl ; 
     756     
     757       
    750758    } 
    751759     
  • XIOS/dev/dev_ym/XIOS_SERVICES/src/context_client.cpp

    r1761 r1764  
    262262          { 
    263263            for (int i = 0; i < context->serverPrimServer.size(); ++i)  context->serverPrimServer[i]->listen(); 
    264             CServer::contextEventLoop(false) ; // avoid dead-lock at finalize... 
     264 //ym           CServer::contextEventLoop(false) ; // avoid dead-lock at finalize... 
     265            context->globalEventLoop() ; 
    265266          } 
    266267 
  • XIOS/dev/dev_ym/XIOS_SERVICES/src/context_server.cpp

    r1761 r1764  
    3030  using namespace std ; 
    3131 
    32   CContextServer::CContextServer(CContext* parent,MPI_Comm intraComm_,MPI_Comm interComm_) 
     32  CContextServer::CContextServer(CContext* parent,MPI_Comm intraComm_,MPI_Comm interComm_) : eventScheduler_(nullptr), isProcessingEvent_(false) 
    3333  { 
    3434    context=parent; 
     
    5353    if (contextInfo.serviceType != CServicesManager::CLIENT) // we must have an event scheduler => to be retrieve from the associated services 
    5454    { 
    55       eventScheduler_=CXios::getPoolRessource()->getService(contextInfo.serviceId,contextInfo.partitionId)->getEventScheduler() ; 
     55      if (!isAttachedModeEnabled()) eventScheduler_=CXios::getPoolRessource()->getService(contextInfo.serviceId,contextInfo.partitionId)->getEventScheduler() ; 
    5656    } 
    5757 
     
    321321    CEventServer* event; 
    322322     
    323     if (context->isProcessingEvent()) return ; 
     323//    if (context->isProcessingEvent()) return ; 
     324    if (isProcessingEvent_) return ; 
    324325 
    325326    it=events.find(currentTimeLine); 
     
    330331      if (event->isFull()) 
    331332      { 
    332         if (!scheduled && CServer::eventScheduler) // Skip event scheduling for attached mode and reception on client side 
     333        if (!scheduled && eventScheduler_) // Skip event scheduling for attached mode and reception on client side 
    333334        { 
    334           CServer::eventScheduler->registerEvent(currentTimeLine,hashId); 
     335          eventScheduler_->registerEvent(currentTimeLine,hashId); 
    335336          scheduled=true; 
    336337        } 
    337         else if (!CServer::eventScheduler || CServer::eventScheduler->queryEvent(currentTimeLine,hashId) ) 
     338        else if (!eventScheduler_ || eventScheduler_->queryEvent(currentTimeLine,hashId) ) 
    338339        { 
    339340         // When using attached mode, synchronise the processes to avoid that differents event be scheduled by differents processes 
    340341         // The best way to properly solve this problem will be to use the event scheduler also in attached mode 
    341342         // for now just set up a MPI barrier 
    342          if (!CServer::eventScheduler && CXios::isServer) MPI_Barrier(intraComm) ; 
    343  
    344          context->setProcessingEvent() ; 
     343         if (!eventScheduler_ && CXios::isServer) MPI_Barrier(intraComm) ; 
     344 
     345//         context->setProcessingEvent() ; 
     346         isProcessingEvent_=true ; 
    345347         CTimer::get("Process events").resume(); 
    346348         dispatchEvent(*event); 
    347349         CTimer::get("Process events").suspend(); 
    348          context->unsetProcessingEvent() ; 
     350         isProcessingEvent_=false ; 
     351//         context->unsetProcessingEvent() ; 
    349352         pendingEvent=false; 
    350353         delete event; 
  • XIOS/dev/dev_ym/XIOS_SERVICES/src/context_server.hpp

    r1761 r1764  
    6666      vector<MPI_Win> windows ; //! one sided mpi windows to expose client buffers to servers ; No memory will be attached on server side. 
    6767      CEventScheduler* eventScheduler_ ; 
     68      bool isProcessingEvent_ ; 
    6869  } ; 
    6970 
  • XIOS/dev/dev_ym/XIOS_SERVICES/src/cxios.cpp

    r1761 r1764  
    341341  } 
    342342 
     343   
     344  void CXios::finalizeRessourcesManager() 
     345  { 
     346    delete ressourcesManager_; 
     347  } 
     348 
     349  void CXios::finalizeServicesManager() 
     350  { 
     351    delete servicesManager_  ; 
     352  } 
     353 
     354  void CXios::finalizeContextsManager() 
     355  { 
     356    delete contextsManager_  ; 
     357  } 
     358   
     359  void CXios::finalizeDaemonsManager() 
     360  { 
     361    delete daemonsManager_  ; 
     362  } 
     363   
     364 
    343365  CPoolRessource* CXios::getPoolRessource(void) 
    344366  { 
  • XIOS/dev/dev_ym/XIOS_SERVICES/src/cxios.hpp

    r1761 r1764  
    9191     static void launchRessourcesManager(bool isXiosServer) ; 
    9292      
     93     static void finalizeServicesManager() ; 
     94     static void finalizeContextsManager() ; 
     95     static void finalizeDaemonsManager() ; 
     96     static void finalizeRessourcesManager() ; 
     97 
    9398     static CRessourcesManager* getRessourcesManager(void) { return ressourcesManager_ ;} 
    9499     static CServicesManager*   getServicesManager(void) { return servicesManager_ ;} 
  • XIOS/dev/dev_ym/XIOS_SERVICES/src/manager/contexts_manager.cpp

    r1761 r1764  
    3636  } 
    3737 
     38 
     39  CContextsManager::~CContextsManager() 
     40  { 
     41    delete winNotify_ ; 
     42    delete winContexts_ ; 
     43  } 
     44 
    3845  bool CContextsManager::createServerContext(const std::string& poolId, const std::string& serviceId, const int& partitionId, 
    3946                                             const string& contextId, bool wait) 
     
    4855      while (!ok)  
    4956      { 
    50         CXios::getDaemonsManager()->eventLoop() ; 
     57        CXios::getDaemonsManager()->servicesEventLoop() ; 
    5158        ok=servicesManager->getServiceLeader(poolId, serviceId, partitionId, serviceLeader) ; 
    5259      } 
     
    7986      while (!ok)  
    8087      { 
    81         CXios::getDaemonsManager()->eventLoop() ; 
     88        CXios::getDaemonsManager()->servicesEventLoop() ; 
    8289        ok=CXios::getServicesManager()->getServiceType(poolId,serviceId, 0, type) ; 
    8390        if (ok) ok=getContextLeader(getServerContextName(poolId, serviceId, partitionId, type, contextId), contextLeader) ; 
  • XIOS/dev/dev_ym/XIOS_SERVICES/src/manager/contexts_manager.hpp

    r1761 r1764  
    2828  
    2929    CContextsManager(bool isXiosServer) ; 
     30    ~CContextsManager() ; 
     31     
    3032    bool createServerContext(const std::string& poolId, const std::string& serviceId, const int& partitionId, const string& contextId, bool wait=true) ; 
    3133/*    bool createServerContextIntercomm(const std::string& poolId, const std::string& serviceId, const int& partitionId, const std::string& contextId, 
  • XIOS/dev/dev_ym/XIOS_SERVICES/src/manager/daemons_manager.cpp

    r1761 r1764  
    2626  } 
    2727 
     28  CDaemonsManager::~CDaemonsManager() 
     29  { 
     30    CXios::finalizeContextsManager() ; 
     31    CXios::finalizeServicesManager() ; 
     32    CXios::finalizeRessourcesManager() ; 
     33  } 
     34 
    2835  bool CDaemonsManager::eventLoop(void) 
    2936  { 
     
    3138    CXios::getServicesManager()->eventLoop() ; 
    3239    CXios::getContextsManager()->eventLoop() ; 
    33     if (isServer_) return CServer::getServersRessource()->eventLoop() ; 
    34     else  return CXios::getPoolRessource()->eventLoop() ; 
     40    if (isServer_) return CServer::getServersRessource()->eventLoop(false) ; 
     41    else  return CXios::getPoolRessource()->eventLoop(false) ; 
    3542  } 
     43   
     44  bool CDaemonsManager::servicesEventLoop(void) 
     45  { 
     46    CXios::getRessourcesManager()->eventLoop() ; 
     47    CXios::getServicesManager()->eventLoop() ; 
     48    CXios::getContextsManager()->eventLoop() ; 
     49    if (isServer_) return CServer::getServersRessource()->eventLoop(true) ; 
     50    else  return CXios::getPoolRessource()->eventLoop(true) ; 
     51  }  
    3652 
    3753} 
  • XIOS/dev/dev_ym/XIOS_SERVICES/src/manager/daemons_manager.hpp

    r1761 r1764  
    1111 
    1212    CDaemonsManager(bool isXiosServer) ; 
     13    ~CDaemonsManager() ; 
    1314 
    1415    bool eventLoop(void) ; 
     16    bool servicesEventLoop(void) ; 
    1517     
    1618    private: 
  • XIOS/dev/dev_ym/XIOS_SERVICES/src/manager/pool_ressource.cpp

    r1761 r1764  
    100100  } 
    101101 
    102   bool CPoolRessource::eventLoop(void) 
     102  bool CPoolRessource::eventLoop(bool serviceOnly) 
    103103  { 
    104104    checkCreateServiceNotification() ; 
    105105    for (auto it=services_.begin(); it!=services_.end() ; ++it)  
    106106    { 
    107       if (it->second->eventLoop()) 
     107      if (it->second->eventLoop(serviceOnly)) 
    108108      { 
    109109        services_.erase(it) ; 
  • XIOS/dev/dev_ym/XIOS_SERVICES/src/manager/pool_ressource.hpp

    r1761 r1764  
    3131    void checkCreateServiceNotification(void) ; 
    3232    void createNewService(const std::string& serviceId, int type, int size, int nbPartitions, bool in) ; 
    33      bool eventLoop(void) ; 
     33     bool eventLoop(bool serviceOnly=false) ; 
    3434    CService* getService(const std::string serviceId, int partitionId) { return services_[make_tuple(serviceId,partitionId)]; } 
    3535    void finalizeSignal(void) ; 
  • XIOS/dev/dev_ym/XIOS_SERVICES/src/manager/ressources_manager.cpp

    r1761 r1764  
    3434    MPI_Barrier(xiosComm_)  ;     
    3535  } 
    36  
     36   
     37  CRessourcesManager::~CRessourcesManager() 
     38  { 
     39    delete winNotify_ ; 
     40    delete winRessources_ ; 
     41  }  
    3742 
    3843  void CRessourcesManager::createPool(const string& poolId, int size) 
  • XIOS/dev/dev_ym/XIOS_SERVICES/src/manager/ressources_manager.hpp

    r1761 r1764  
    2828     
    2929    CRessourcesManager(bool isXiosServer) ; 
     30    ~CRessourcesManager() ; 
    3031 
    3132    void eventLoop(void) ; 
  • XIOS/dev/dev_ym/XIOS_SERVICES/src/manager/server_context.cpp

    r1761 r1764  
    1515 
    1616  CServerContext::CServerContext(CService* parentService, MPI_Comm contextComm, const std::string& poolId, const std::string& serviceId,  
    17                                  const int& partitionId, const std::string& contextId) : finalizeSignal_(false), parentService_(parentService) 
     17                                 const int& partitionId, const std::string& contextId) : finalizeSignal_(false), parentService_(parentService), 
     18                                 hasNotification_(false) 
    1819  { 
    1920   int localRank, globalRank, commSize ; 
     
    4849  } 
    4950 
    50    
     51  CServerContext::~CServerContext() 
     52  { 
     53 
     54  }  
     55 
    5156  bool CServerContext::createIntercomm(const string& poolId, const string& serviceId, const int& partitionId, const string& contextId,  
    5257                                       const MPI_Comm& intraComm, MPI_Comm& interCommClient, MPI_Comm& interCommServer, bool wait) 
     
    7580    } 
    7681     
    77     auto eventScheduler=parentService_->getEventScheduler() ; 
    78     std::hash<string> hashString ; 
    79     size_t hashId = hashString(name_) ; 
    80     size_t currentTimeLine=0 ; 
    81     eventScheduler->registerEvent(currentTimeLine,hashId);  
    82  
    83     while (!eventScheduler->queryEvent(currentTimeLine,hashId)) 
    84     { 
    85        CXios::getDaemonsManager()->eventLoop() ; 
    86     }   
     82    MPI_Request req ; 
     83    MPI_Status status ; 
     84    MPI_Ibarrier(intraComm,&req) ; 
     85     
     86    int flag=false ; 
     87    while(!flag)  
     88    { 
     89      CXios::getDaemonsManager()->servicesEventLoop() ; 
     90      MPI_Test(&req,&flag,&status) ; 
     91    } 
     92//    auto eventScheduler=parentService_->getEventScheduler() ; 
     93//    std::hash<string> hashString ; 
     94//    size_t hashId = hashString(name_) ; 
     95//    size_t currentTimeLine=0 ; 
     96//    eventScheduler->registerEvent(currentTimeLine,hashId);  
     97// 
     98//    while (!eventScheduler->queryEvent(currentTimeLine,hashId)) 
     99//    { 
     100//       CXios::getDaemonsManager()->servicesEventLoop() ; 
     101//       eventScheduler->checkEvent() ; 
     102//    }   
    87103     
    88104    MPI_Bcast(&ok, 1, MPI_INT, 0, intraComm) ; 
     
    90106    if (ok)   
    91107    { 
     108      int globalRank ; 
     109      MPI_Comm_rank(xiosComm_,&globalRank) ; 
     110      MPI_Bcast(&contextLeader, 1, MPI_INT, 0, intraComm) ; 
     111       
     112      int overlap, nOverlap ; 
     113      if (contextLeader==globalRank) overlap=1 ; 
     114      else overlap=0 ; 
     115      MPI_Allreduce(&overlap, &nOverlap, 1, MPI_INT, MPI_SUM, contextComm_) ; 
     116/* 
    92117      int overlap  ; 
    93118      if (get<0>(overlapedComm_[name_])) overlap=1 ; 
     
    98123      int commSize ; 
    99124      MPI_Comm_size(contextComm_,&commSize ) ; 
    100       if (nOverlap==commSize) 
    101       { 
     125*/ 
     126      if (nOverlap> 0 ) 
     127      { 
     128        while (get<0>(overlapedComm_[name_])==false) CXios::getDaemonsManager()->servicesEventLoop() ; 
     129        isAttachedMode_=true ; 
    102130        cout<<"CServerContext::createIntercomm : total overlap ==> context in attached mode"<<endl ; 
    103131        interCommClient=newInterCommClient ; 
     
    107135      {  
    108136        cout<<"CServerContext::createIntercomm : No overlap ==> context in server mode"<<endl ; 
     137        isAttachedMode_=false ; 
    109138        MPI_Intercomm_create(intraComm, 0, xiosComm_, contextLeader, 3141, &interCommClient) ; 
    110139        MPI_Comm_dup(interCommClient, &interCommServer) ; 
     
    128157     for(int rank=0; rank<commSize; rank++) 
    129158     { 
    130        notifyType_=NOTIFY_CREATE_INTERCOMM ; 
    131        notifyCreateIntercomm_ = make_tuple(remoteLeader, sourceContext) ; 
     159       notifyOutType_=NOTIFY_CREATE_INTERCOMM ; 
     160       notifyOutCreateIntercomm_ = make_tuple(remoteLeader, sourceContext) ; 
    132161       sendNotification(rank) ; 
    133162     } 
     
    147176    buffer.realloc(maxBufferSize_) ; 
    148177     
    149     if (notifyType_==NOTIFY_CREATE_INTERCOMM) 
    150     { 
    151       auto& arg=notifyCreateIntercomm_ ; 
    152       buffer << notifyType_ << std::get<0>(arg)<<std::get<1>(arg) ; 
     178    if (notifyOutType_==NOTIFY_CREATE_INTERCOMM) 
     179    { 
     180      auto& arg=notifyOutCreateIntercomm_ ; 
     181      buffer << notifyOutType_ << std::get<0>(arg)<<std::get<1>(arg) ; 
    153182    } 
    154183  } 
     
    156185  void CServerContext::notificationsDumpIn(CBufferIn& buffer) 
    157186  { 
    158     if (buffer.bufferSize() == 0) notifyType_= NOTIFY_NOTHING ; 
     187    if (buffer.bufferSize() == 0) notifyInType_= NOTIFY_NOTHING ; 
    159188    else 
    160189    { 
    161       buffer>>notifyType_; 
    162       if (notifyType_==NOTIFY_CREATE_INTERCOMM) 
    163       { 
    164         auto& arg=notifyCreateIntercomm_ ; 
     190      buffer>>notifyInType_; 
     191      if (notifyInType_==NOTIFY_CREATE_INTERCOMM) 
     192      { 
     193        auto& arg=notifyInCreateIntercomm_ ; 
    165194        buffer >> std::get<0>(arg)>> std::get<1>(arg) ; 
    166195      } 
     
    170199  void CServerContext::checkNotifications(void) 
    171200  { 
    172     int commRank ; 
    173     MPI_Comm_rank(contextComm_, &commRank) ; 
    174     winNotify_->lockWindow(commRank,0) ; 
    175     winNotify_->popFromWindow(commRank, this, &CServerContext::notificationsDumpIn) ; 
    176     winNotify_->unlockWindow(commRank,0) ; 
    177     if (notifyType_==NOTIFY_CREATE_INTERCOMM) createIntercomm() ; 
    178   } 
    179  
    180   bool CServerContext::eventLoop(void) 
     201    if (!hasNotification_) 
     202    { 
     203      int commRank ; 
     204      MPI_Comm_rank(contextComm_, &commRank) ; 
     205      winNotify_->lockWindow(commRank,0) ; 
     206      winNotify_->popFromWindow(commRank, this, &CServerContext::notificationsDumpIn) ; 
     207      winNotify_->unlockWindow(commRank,0) ; 
     208       
     209      if (notifyInType_!= NOTIFY_NOTHING) 
     210      { 
     211        hasNotification_=true ; 
     212        auto eventScheduler=parentService_->getEventScheduler() ; 
     213        std::hash<string> hashString ; 
     214        size_t hashId = hashString(name_) ; 
     215        size_t currentTimeLine=0 ; 
     216        eventScheduler->registerEvent(currentTimeLine,hashId);  
     217      } 
     218    } 
     219     
     220    if (hasNotification_) 
     221    { 
     222      auto eventScheduler=parentService_->getEventScheduler() ; 
     223      std::hash<string> hashString ; 
     224      size_t hashId = hashString(name_) ; 
     225      size_t currentTimeLine=0 ; 
     226      if (eventScheduler->queryEvent(currentTimeLine,hashId)) 
     227      { 
     228        if (notifyInType_==NOTIFY_CREATE_INTERCOMM) createIntercomm() ; 
     229        hasNotification_=false ; 
     230      } 
     231    } 
     232  } 
     233 
     234  bool CServerContext::eventLoop(bool serviceOnly) 
    181235  { 
    182236    bool finished=false ; 
    183     checkNotifications() ; 
    184     if (context_!=nullptr)   
     237    if (winNotify_!=nullptr) checkNotifications() ; 
     238    if (!serviceOnly && context_!=nullptr)   
    185239    { 
    186240      if (context_->eventLoop()) 
     
    198252  { 
    199253     MPI_Comm interCommServer, interCommClient ; 
    200      int remoteLeader=get<0>(notifyCreateIntercomm_) ; 
    201      string sourceContext=get<1>(notifyCreateIntercomm_) ; 
     254     auto& arg=notifyInCreateIntercomm_ ; 
     255     int remoteLeader=get<0>(arg) ; 
     256     string sourceContext=get<1>(arg) ; 
    202257 
    203258     auto it=overlapedComm_.find(sourceContext) ; 
     
    215270    if (nOverlap==commSize) 
    216271    { 
    217       cout<<"CServerContext::createIntercomm : total overlap ==> context in attached mode"<<endl ; 
     272      info(10)<<"CServerContext::createIntercomm : total overlap ==> context in attached mode"<<endl ; 
     273      isAttachedMode_=true ; 
    218274      interCommClient=get<2>(it->second) ; 
    219275      interCommServer=get<1>(it->second) ; 
     
    224280    else if (nOverlap==0) 
    225281    {  
    226       cout<<"CServerContext::createIntercomm : No overlap ==> context in server mode"<<endl ; 
     282      info(10)<<"CServerContext::createIntercomm : No overlap ==> context in server mode"<<endl ; 
     283      isAttachedMode_=false ; 
    227284      MPI_Intercomm_create(contextComm_, 0, xiosComm_, remoteLeader, 3141, &interCommServer) ; 
    228285      MPI_Comm_dup(interCommServer,&interCommClient) ; 
     
    233290    else 
    234291    { 
    235       cout<<"CServerContext::createIntercomm : partial overlap ==> not managed"<<endl ; 
     292      ERROR("void CServerContext::createIntercomm(void)",<<"CServerContext::createIntercomm : partial overlap ==> not managed") ; 
    236293    } 
    237294    
    238295  } 
    239296 
     297  void CServerContext::freeComm(void) 
     298  { 
     299    delete winNotify_ ; 
     300    winNotify_=nullptr ; 
     301    MPI_Comm_free(&contextComm_) ; 
     302    // don't forget intercomm -> later 
     303  } 
     304   
    240305  void CServerContext::finalizeSignal(void) 
    241306  { 
    242307    finalizeSignal_=true ; 
    243308  } 
    244     
    245309 
    246310} 
  • XIOS/dev/dev_ym/XIOS_SERVICES/src/manager/server_context.hpp

    r1761 r1764  
    1818    CServerContext(CService* parentService, MPI_Comm contextComm, const std::string& poolId, const std::string& serviceId,  
    1919                  const int& partitionId, const std::string& contextId) ; 
     20    ~CServerContext() ; 
    2021 
    2122    bool createIntercomm(const string& poolId, const string& serviceId, const int& partitionId, const string& contextId,  
     
    2627    void checkNotifications(void) ; 
    2728 
    28     bool eventLoop(void) ; 
     29    bool eventLoop(bool serviceOnly=false) ; 
    2930    void notificationsDumpOut(CBufferOut& buffer) ; 
    3031    void notificationsDumpIn(CBufferIn& buffer) ; 
    3132    void finalizeSignal(void) ; 
     33    void freeComm(void) ; 
     34    bool isAttachedMode(void) { return isAttachedMode_ ;} 
    3235    private: 
    3336    void createIntercomm(void) ; 
     
    4750    const size_t maxBufferSize_=1024*1024 ; 
    4851    CWindowManager* winNotify_ ; 
    49     int notifyType_ ; 
    50     tuple<int, std::string> notifyCreateIntercomm_ ; 
     52    int notifyInType_, notifyOutType_ ; 
     53    tuple<int, std::string> notifyInCreateIntercomm_, notifyOutCreateIntercomm_ ; 
    5154 
    5255    const int localLeader_=0 ; 
    5356    int globalLeader_ ; 
    5457    bool finalizeSignal_ ; 
     58    bool hasNotification_ ; 
     59    bool isAttachedMode_ ; 
    5560 
    5661    friend class CWindowManager ; 
  • XIOS/dev/dev_ym/XIOS_SERVICES/src/manager/servers_ressource.cpp

    r1761 r1764  
    5757       } 
    5858        
    59        notifyType_=NOTIFY_CREATE_POOL ; 
    60        notifyCreatePool_ = make_tuple(poolId, isPartOf) ; 
     59       notifyOutType_=NOTIFY_CREATE_POOL ; 
     60       notifyOutCreatePool_ = make_tuple(poolId, isPartOf) ; 
    6161       sendNotification(freeRessourcesRank_[i]) ; 
    6262    } 
     
    7171    for(int rank=0; rank<commSize;rank++) 
    7272    {  
    73       notifyType_=NOTIFY_FINALIZE ; 
     73      notifyOutType_=NOTIFY_FINALIZE ; 
    7474      sendNotification(rank) ; 
    7575    } 
     
    8989    buffer.realloc(maxBufferSize_) ; 
    9090     
    91     if (notifyType_==NOTIFY_CREATE_POOL) 
     91    if (notifyOutType_==NOTIFY_CREATE_POOL) 
    9292    { 
    93       auto& arg=notifyCreatePool_ ; 
    94       buffer << notifyType_ << std::get<0>(arg) << std::get<1>(arg) ; 
     93      auto& arg=notifyOutCreatePool_ ; 
     94      buffer << notifyOutType_ << std::get<0>(arg) << std::get<1>(arg) ; 
    9595    } 
    96     else if (notifyType_==NOTIFY_FINALIZE) buffer << notifyType_ ; 
     96    else if (notifyOutType_==NOTIFY_FINALIZE) buffer << notifyOutType_ ; 
    9797  } 
    9898 
    9999  void CServersRessource::notificationsDumpIn(CBufferIn& buffer) 
    100100  { 
    101     if (buffer.bufferSize() == 0) notifyType_= NOTIFY_NOTHING ; 
     101    if (buffer.bufferSize() == 0) notifyInType_= NOTIFY_NOTHING ; 
    102102    else 
    103103    { 
    104       buffer>>notifyType_; 
    105       if (notifyType_==NOTIFY_CREATE_POOL) 
     104      buffer>>notifyInType_; 
     105      if (notifyInType_==NOTIFY_CREATE_POOL) 
    106106      { 
    107         auto& arg=notifyCreatePool_ ; 
     107        auto& arg=notifyInCreatePool_ ; 
    108108        buffer >> std::get<0>(arg) >> std::get<1>(arg)  ; 
    109109      } 
    110       else if (notifyType_==NOTIFY_FINALIZE) { /*nothing to do*/} 
     110      else if (notifyInType_==NOTIFY_FINALIZE) { /*nothing to do*/} 
    111111    } 
    112112  } 
    113113 
    114   bool CServersRessource::eventLoop() 
     114  bool CServersRessource::eventLoop(bool serviceOnly) 
    115115  { 
    116116    checkNotifications() ; 
    117117    if (poolRessource_!=nullptr)  
    118118    { 
    119       if (poolRessource_->eventLoop()) 
     119      if (poolRessource_->eventLoop(serviceOnly)) 
    120120      { 
    121121        poolRessource_=nullptr ; 
     
    135135    winNotify_->popFromWindow(commRank, this, &CServersRessource::notificationsDumpIn) ; 
    136136    winNotify_->unlockWindow(commRank,0) ; 
    137     if (notifyType_==NOTIFY_CREATE_POOL) createPool() ; 
    138     else if (notifyType_==NOTIFY_FINALIZE) finalizeSignal() ; 
     137    if (notifyInType_==NOTIFY_CREATE_POOL) createPool() ; 
     138    else if (notifyInType_==NOTIFY_FINALIZE) finalizeSignal() ; 
    139139  } 
    140140 
    141141  void CServersRessource::createPool(void) 
    142142  { 
    143     auto& arg=notifyCreatePool_ ; 
     143    auto& arg=notifyInCreatePool_ ; 
    144144    string poolId=get<0>(arg) ; 
    145145    bool isPartOf=get<1>(arg) ; 
  • XIOS/dev/dev_ym/XIOS_SERVICES/src/manager/servers_ressource.hpp

    r1761 r1764  
    2626    void createPool(const string& poolId, const int size) ; 
    2727    void createPool(void) ; 
    28     bool eventLoop(void) ; 
     28    bool eventLoop(bool serviceOnly=false) ; 
    2929    void sendNotification(int rank) ; 
    3030    void notificationsDumpOut(CBufferOut& buffer) ; 
     
    4444    const size_t maxBufferSize_=1024*1024 ; 
    4545    CWindowManager* winNotify_ ; 
    46     int notifyType_ ; 
    47     std::tuple<std::string, bool> notifyCreatePool_ ; 
     46     
     47    int notifyInType_,notifyOutType_ ; 
     48    std::tuple<std::string, bool> notifyInCreatePool_,notifyOutCreatePool_ ; 
    4849    CPoolRessource* poolRessource_ ; 
    4950    bool finalizeSignal_ ; 
  • XIOS/dev/dev_ym/XIOS_SERVICES/src/manager/services.cpp

    r1761 r1764  
    1010  CService::CService(MPI_Comm serviceComm, const std::string& poolId, const std::string& serviceId, const int& partitionId,  
    1111                     int type, int nbPartitions) : finalizeSignal_(false), eventScheduler_(nullptr), poolId_(poolId), serviceId_(serviceId), 
    12                                                    partitionId_(partitionId), type_(type), nbPartitions_(nbPartitions) 
     12                                                   partitionId_(partitionId), type_(type), nbPartitions_(nbPartitions), hasNotification_(false) 
    1313 
    1414 
     
    3434    } 
    3535    eventScheduler_ = new CEventScheduler(serviceComm_) ; 
     36 
     37    ostringstream oss; 
     38    oss<<partitionId; 
     39    name_= poolId+"::"+serviceId+"_"+oss.str(); 
    3640  } 
    3741 
     
    4145    MPI_Comm_size(serviceComm_, &commSize) ; 
    4246     
    43     for(int rank=0; rank<commSize; rank++) createContextNotify(rank, poolId, serviceId, partitionId, contextId) ; 
     47    for(int rank=0; rank<commSize; rank++)  
     48    { 
     49      notifyOutType_=NOTIFY_CREATE_CONTEXT ; 
     50      notifyOutCreateContext_ = make_tuple(poolId, serviceId, partitionId, contextId) ; 
     51      sendNotification(rank) ; 
     52    } 
    4453  } 
    4554/* 
     
    8796  } 
    8897 
    89   bool CService::eventLoop(void) 
    90   { 
    91     checkCreateContextNotification() ; 
     98  bool CService::eventLoop(bool serviceOnly) 
     99  { 
     100    //checkCreateContextNotification() ; 
     101    checkNotifications() ; 
     102 
    92103    eventScheduler_->checkEvent() ; 
    93104    for(auto it=contexts_.begin();it!=contexts_.end();++it)  
    94105    { 
    95       if (it->second->eventLoop()) 
     106      if (it->second->eventLoop(serviceOnly)) 
    96107      { 
    97108        contexts_.erase(it) ; 
     
    105116  } 
    106117 
     118  void CService::sendNotification(int rank) 
     119  { 
     120    winNotify_->lockWindow(rank,0) ; 
     121    winNotify_->pushToWindow(rank, this, &CService::notificationsDumpOut) ; 
     122    winNotify_->unlockWindow(rank,0) ; 
     123  } 
     124 
     125   
     126  void CService::notificationsDumpOut(CBufferOut& buffer) 
     127  { 
     128     
     129    buffer.realloc(maxBufferSize_) ; 
     130     
     131    if (notifyOutType_==NOTIFY_CREATE_CONTEXT) 
     132    { 
     133      auto& arg=notifyOutCreateContext_ ; 
     134      buffer << notifyOutType_ << std::get<0>(arg)<<std::get<1>(arg) << std::get<2>(arg)<<std::get<3>(arg) ; 
     135    } 
     136  } 
     137 
     138  void CService::notificationsDumpIn(CBufferIn& buffer) 
     139  { 
     140    if (buffer.bufferSize() == 0) notifyInType_= NOTIFY_NOTHING ; 
     141    else 
     142    { 
     143      buffer>>notifyInType_; 
     144      if (notifyInType_==NOTIFY_CREATE_CONTEXT) 
     145      { 
     146        info(10)<<"NotifyDumpOut"<<endl ; 
     147        auto& arg=notifyInCreateContext_ ; 
     148        buffer >> std::get<0>(arg)>> std::get<1>(arg) >> std::get<2>(arg)>> std::get<3>(arg); 
     149      } 
     150    } 
     151  } 
     152 
     153 
     154 
     155 
     156  void CService::checkNotifications(void) 
     157  { 
     158    if (!hasNotification_) 
     159    { 
     160      int commRank ; 
     161      MPI_Comm_rank(serviceComm_, &commRank) ; 
     162      winNotify_->lockWindow(commRank,0) ; 
     163      winNotify_->popFromWindow(commRank, this, &CService::notificationsDumpIn) ; 
     164      winNotify_->unlockWindow(commRank,0) ; 
     165       
     166      if (notifyInType_!= NOTIFY_NOTHING) 
     167      { 
     168        hasNotification_=true ; 
     169        std::hash<string> hashString ; 
     170        size_t hashId = hashString(name_) ; 
     171        size_t currentTimeLine=0 ; 
     172        eventScheduler_->registerEvent(currentTimeLine,hashId);  
     173      } 
     174    } 
     175     
     176    if (hasNotification_) 
     177    { 
     178      std::hash<string> hashString ; 
     179      size_t hashId = hashString(name_) ; 
     180      size_t currentTimeLine=0 ; 
     181      if (eventScheduler_->queryEvent(currentTimeLine,hashId)) 
     182      { 
     183        if (notifyInType_==NOTIFY_CREATE_CONTEXT) createContext() ; 
     184        hasNotification_=false ; 
     185      } 
     186    } 
     187  } 
     188 
     189 
     190 
     191 
    107192  void CService::checkCreateContextNotification(void) 
    108193  { 
     
    122207  } 
    123208 
     209  void CService::createContext(void) 
     210   { 
     211     auto& arg=notifyInCreateContext_ ; 
     212     string poolId = get<0>(arg) ; 
     213     string& serviceId = get<1>(arg) ; 
     214     int partitionId = get<2>(arg) ; 
     215     string contextId = get<3>(arg) ; 
     216     contexts_[contextId] = new CServerContext(this, serviceComm_, poolId, serviceId, partitionId, contextId) ;  
     217   } 
     218 
     219   //to remove 
    124220   void CService::createNewContext(const std::string& poolId, const std::string& serviceId, const int& partitionId, const std::string& contextId) 
    125221   { 
  • XIOS/dev/dev_ym/XIOS_SERVICES/src/manager/services.hpp

    r1761 r1764  
    1616    public: 
    1717     
     18    const int NOTIFY_NOTHING=0 ; 
     19    const int NOTIFY_CREATE_CONTEXT=1 ; 
     20 
    1821    CService(MPI_Comm serviceComm, const std::string& poolId, const std::string& serviceId, const int& partitionId,  
    1922             int type, int nbPartitions) ; 
    20     bool eventLoop(void) ; 
     23    bool eventLoop(bool serviceOnly=false) ; 
    2124    void createContext(const std::string& poolId, const std::string& serviceId, const int& partitionId, const std::string& contextId) ; 
    2225    void checkCreateContextNotification(void) ; 
     
    3639 
    3740    private: 
    38      
     41    void sendNotification(int rank) ; 
     42    void notificationsDumpOut(CBufferOut& buffer) ; 
     43    void notificationsDumpIn(CBufferIn& buffer) ; 
     44    void checkNotifications(void) ; 
     45    void createContext(void) ; 
     46 
    3947    MPI_Comm serviceComm_ ; 
    4048    MPI_Comm globalComm_ ; 
    41     
     49 
    4250    const size_t maxBufferSize_=1024*1024 ; 
    4351    const int localLeader_=0 ; 
    4452    int globalLeader_ ; 
    4553    CWindowManager* winNotify_ ; 
     54     
     55    std::string name_ ; 
     56 
    4657    std::list<std::tuple<std::string, std::string, int, std::string>> notifications_; 
     58     
     59    bool hasNotification_ ; 
     60    int notifyInType_,notifyOutType_ ; 
     61    std::tuple<std::string, std::string, int, std::string> notifyInCreateContext_, notifyOutCreateContext_ ; 
     62 
    4763    std::map<std::string, CServerContext*> contexts_ ; 
    4864    bool finalizeSignal_ ; 
  • XIOS/dev/dev_ym/XIOS_SERVICES/src/manager/services_manager.cpp

    r1761 r1764  
    4242  } 
    4343 
     44  CServicesManager::~CServicesManager() 
     45  { 
     46    delete winNotify_ ; 
     47    delete winServices_ ; 
     48  } 
     49 
    4450  bool CServicesManager::createServices(const std::string& poolId, const std::string& serviceId,  
    4551                                        int type, int size, int nbPartitions, bool wait)  
  • XIOS/dev/dev_ym/XIOS_SERVICES/src/manager/services_manager.hpp

    r1761 r1764  
    2727     
    2828    CServicesManager(bool isXiosServer) ; 
     29    ~CServicesManager() ; 
     30     
    2931    bool createServices(const std::string& poolId, const std::string& serviceId, int type, int size, int nbPartition, bool wait=true) ; 
    3032    void createServicesNotify(int rank, const string& serviceId, int type, int size, int nbPartitions) ; 
  • XIOS/dev/dev_ym/XIOS_SERVICES/src/manager/window_manager.hpp

    r1761 r1764  
    126126    } 
    127127 
     128    ~CWindowManager() 
     129    { 
     130      MPI_Win_free(&window_) ; 
     131    } 
    128132  } ; 
    129133} 
  • XIOS/dev/dev_ym/XIOS_SERVICES/src/node/context.cpp

    r1761 r1764  
    3636      , isPostProcessed(false), finalized(false) 
    3737      , idServer_(), client(nullptr), server(nullptr) 
    38       , allProcessed(false), countChildCtx_(0), isProcessingEvent_(false) 
     38      , allProcessed(false), countChildContextFinalized_(0), isProcessingEvent_(false) 
    3939 
    4040   { /* Ne rien faire de plus */ } 
     
    4545      , isPostProcessed(false), finalized(false) 
    4646      , idServer_(), client(nullptr), server(nullptr) 
    47       , allProcessed(false), countChildCtx_(0), isProcessingEvent_(false) 
     47      , allProcessed(false), countChildContextFinalized_(0), isProcessingEvent_(false) 
    4848   { /* Ne rien faire de plus */ } 
    4949 
     
    475475    MPI_Comm_dup(intraComm_, &intraCommClient); 
    476476    comms.push_back(intraCommClient); 
    477      
     477    // attached_mode=parentServerContext_->isAttachedMode() ; //ym probably inherited from source context 
    478478    server = new CContextServer(this,intraComm_, interCommServer); // check if we need to dupl. intraComm_ ? 
    479479    client = new CContextClient(this,intraCommClient,interCommClient); 
     
    687687  CATCH_DUMP_ATTR 
    688688 
    689  
     689   
     690  void CContext::globalEventLoop(void) 
     691  { 
     692    CXios::getDaemonsManager()->eventLoop() ; 
     693    setCurrent(getId()) ; 
     694  } 
    690695 
    691696 
     
    693698   TRY 
    694699   { 
    695       if (hasClient && !hasServer) // For now we only use server level 1 to read data 
     700      registryOut->hierarchicalGatherRegistry() ; 
     701      if (server->intraCommRank==0) CXios::globalRegistry->mergeRegistry(*registryOut) ; 
     702 
     703      if (hasClient && !hasServer) 
    696704      { 
    697         doPreTimestepOperationsForEnabledReadModeFiles(); 
    698       } 
    699      // Send registry upon calling the function the first time 
    700      if (countChildCtx_ == 0) if (hasClient) sendRegistry() ; 
    701  
    702      // Client: 
    703      // (1) blocking send context finalize to its server 
    704      // (2) blocking receive context finalize from its server 
    705      // (3) some memory deallocations 
    706      if (CXios::isClient) 
    707      { 
    708        // Make sure that client (model) enters the loop only once 
    709        if (countChildCtx_ < 1) 
    710        { 
    711          ++countChildCtx_; 
    712  
    713          info(100)<<"DEBUG: context "<<getId()<<" Send client finalize"<<endl ; 
    714          client->finalize(); 
    715          info(100)<<"DEBUG: context "<<getId()<<" Client finalize sent"<<endl ; 
    716          while (client->havePendingRequests()) client->checkBuffers(); 
    717           
    718          info(100)<<"DEBUG: context "<<getId()<<" no pending request ok"<<endl ; 
    719          while (!server->hasFinished()) 
    720            server->eventLoop(); 
    721         info(100)<<"DEBUG: context "<<getId()<<" server has finished"<<endl ; 
    722          
     705        doPreTimestepOperationsForEnabledReadModeFiles(); // For now we only use server level 1 to read data 
     706 
     707        info(100)<<"DEBUG: context "<<getId()<<" Send client finalize"<<endl ; 
     708        client->finalize(); 
     709        info(100)<<"DEBUG: context "<<getId()<<" Client finalize sent"<<endl ; 
     710        while (client->havePendingRequests()) client->checkBuffers(); 
     711        info(100)<<"DEBUG: context "<<getId()<<" no pending request ok"<<endl ; 
    723712        bool notifiedFinalized=false ; 
    724713        do 
     
    727716        } while (!notifiedFinalized) ; 
    728717        client->releaseBuffers(); 
    729  
    730          if (hasServer) // Mode attache 
    731          { 
    732            closeAllFile(); 
    733            registryOut->hierarchicalGatherRegistry() ; 
    734            if (server->intraCommRank==0) CXios::globalRegistry->mergeRegistry(*registryOut) ; 
    735          } 
    736  
    737          //! Deallocate client buffers 
    738 //         client->releaseBuffers(); 
    739718        info(100)<<"DEBUG: context "<<getId()<<" release client ok"<<endl ; 
    740          //! Free internally allocated communicators 
    741          for (std::list<MPI_Comm>::iterator it = comms.begin(); it != comms.end(); ++it) 
    742            MPI_Comm_free(&(*it)); 
    743          comms.clear(); 
    744  
    745          info(20)<<"CContext: Context <"<<getId()<<"> is finalized."<<endl; 
    746        } 
    747      } 
    748      else if (CXios::isServer) 
    749      { 
    750        // First context finalize message received from a model 
    751        // Send context finalize to its child contexts (if any) 
    752        if (countChildCtx_ == 0) 
     719      } 
     720      else if (hasClient && hasServer) 
     721      { 
    753722         for (int i = 0; i < clientPrimServer.size(); ++i) 
    754723         { 
     
    764733           do 
    765734           { 
    766 //             clientPrimServer[i]->checkBuffers(); 
    767735             notifiedFinalized=clientPrimServer[i]->isNotifiedFinalized() ; 
    768736           } while (!notifiedFinalized) ; 
    769737           clientPrimServer[i]->releaseBuffers(); 
    770738         } 
    771             
    772  
    773        // (Last) context finalized message received 
    774        if (countChildCtx_ == clientPrimServer.size()) 
    775        { 
    776          // Blocking send of context finalize message to its client (e.g. primary server or model) 
    777          info(100)<<"DEBUG: context "<<getId()<<" Send client finalize"<<endl ; 
    778          client->finalize(); 
    779          info(100)<<"DEBUG: context "<<getId()<<" Client finalize sent"<<endl ; 
    780          bool bufferReleased; 
    781          do 
    782          { 
    783            client->checkBuffers(); 
    784            bufferReleased = !client->havePendingRequests(); 
    785          } while (!bufferReleased); 
    786           
    787          bool notifiedFinalized=false ; 
    788          do 
    789          { 
    790   //         client->checkBuffers(); 
    791            notifiedFinalized=client->isNotifiedFinalized() ; 
    792          } while (!notifiedFinalized) ; 
    793          client->releaseBuffers(); 
    794           
    795          finalized = true; 
    796          info(100)<<"DEBUG: context "<<getId()<<" bufferRelease OK"<<endl ; 
    797           
    798          closeAllFile(); // Just move to here to make sure that server-level 1 can close files 
     739         closeAllFile(); 
     740 
     741      } 
     742      else if (!hasClient && hasServer) 
     743      { 
     744        closeAllFile(); 
     745      } 
     746 
     747      freeComms() ; 
    799748         
    800         /*  ym 
    801          if (hasServer && !hasClient) 
    802          {            
    803            registryOut->hierarchicalGatherRegistry() ; 
    804            if (server->intraCommRank==0) CXios::globalRegistry->mergeRegistry(*registryOut) ; 
    805          } 
    806         */ 
    807  
    808          //! Deallocate client buffers 
    809 //         client->releaseBuffers(); 
    810          info(100)<<"DEBUG: context "<<getId()<<" client release"<<endl ; 
    811  
    812 /*          
    813          for (int i = 0; i < clientPrimServer.size(); ++i) 
    814            clientPrimServer[i]->releaseBuffers(); 
    815 */ 
    816          //! Free internally allocated communicators 
    817          for (std::list<MPI_Comm>::iterator it = comms.begin(); it != comms.end(); ++it) 
    818            MPI_Comm_free(&(*it)); 
    819          comms.clear(); 
    820  
    821          info(20)<<"CContext: Context <"<<getId()<<"> is finalized."<<endl; 
    822        } 
    823  
    824        ++countChildCtx_; 
    825      } 
     749      parentServerContext_->freeComm() ; 
     750      finalized = true; 
     751      info(20)<<"CContext: Context <"<<getId()<<"> is finalized."<<endl; 
    826752   } 
    827753   CATCH_DUMP_ATTR 
     
    833759   TRY 
    834760   { 
     761      int countChildCtx_ ; // ym temporary 
     762 
    835763      if (hasClient && !hasServer) // For now we only use server level 1 to read data 
    836764      { 
     
    25552483  CATCH_DUMP_ATTR 
    25562484 
     2485   
     2486  void CContext::sendFinalizeClient(CContextClient* contextClient, const string& contextClientId) 
     2487  TRY 
     2488  { 
     2489    CEventClient event(getType(),EVENT_ID_CONTEXT_FINALIZE_CLIENT); 
     2490    if (contextClient->isServerLeader()) 
     2491    { 
     2492      CMessage msg; 
     2493      msg<<contextClientId ; 
     2494      const std::list<int>& ranks = contextClient->getRanksServerLeader(); 
     2495      for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank) 
     2496           event.push(*itRank,1,msg); 
     2497      contextClient->sendEvent(event); 
     2498    } 
     2499    else contextClient->sendEvent(event); 
     2500  } 
     2501  CATCH_DUMP_ATTR 
     2502 
     2503  
     2504  void CContext::recvFinalizeClient(CEventServer& event) 
     2505  TRY 
     2506  { 
     2507    CBufferIn* buffer=event.subEvents.begin()->buffer; 
     2508    string id; 
     2509    *buffer>>id; 
     2510    get(id)->recvFinalizeClient(*buffer); 
     2511  } 
     2512  CATCH 
     2513 
     2514  void CContext::recvFinalizeClient(CBufferIn& buffer) 
     2515  TRY 
     2516  { 
     2517    countChildContextFinalized_++ ; 
     2518  } 
     2519  CATCH_DUMP_ATTR 
     2520 
     2521 
     2522 
     2523 
    25572524  /*! 
    25582525  * \fn bool CContext::isFinalized(void) 
  • XIOS/dev/dev_ym/XIOS_SERVICES/src/node/context.hpp

    r1761 r1764  
    5353           EVENT_ID_POST_PROCESS, EVENT_ID_SEND_REGISTRY, 
    5454           EVENT_ID_POST_PROCESS_GLOBAL_ATTRIBUTES, 
    55            EVENT_ID_PROCESS_GRID_ENABLED_FIELDS 
     55           EVENT_ID_PROCESS_GRID_ENABLED_FIELDS, 
     56           EVENT_ID_CONTEXT_FINALIZE_CLIENT, 
    5657         }; 
    5758 
     
    106107         bool checkBuffersAndListen(bool enableEventsProcessing=true); 
    107108         bool eventLoop(bool enableEventsProcessing=true); 
     109         void globalEventLoop(void); 
    108110 
    109111         // Finalize a context 
    110112         void finalize(void); 
     113 
    111114         void finalize_old(void); 
    112115         bool isFinalized(void); 
     
    170173         //!< after be gathered to the root process of the context, merged registry is sent to the root process of the servers 
    171174         void sendRegistry(void) ; 
     175         void sendFinalizeClient(CContextClient* contextClient, const string& contextClientId); 
     176 
    172177 
    173178         const StdString& getIdServer(); 
     
    191196         static void recvRegistry(CEventServer& event) ; 
    192197         void recvRegistry(CBufferIn& buffer) ; //!< registry is received by the servers 
    193  
     198         static void recvFinalizeClient(CEventServer& event) ; 
     199         void recvFinalizeClient(CBufferIn& buffer); 
     200          
    194201         void freeComms(void);                  //!< Free internally allcoated communicators 
    195202         void releaseClientBuffers(void);       //! Deallocate buffers allocated by clientContexts 
     
    281288         bool allProcessed; 
    282289         bool finalized; 
    283          int countChildCtx_;        //!< Counter of child contexts (for now it is the number of secondary server pools) 
     290         int countChildContextFinalized_;        //!< Counter of child contexts (for now it is the number of secondary server pools) 
    284291         StdString idServer_; 
    285292         CGarbageCollector garbageCollector; 
  • XIOS/dev/dev_ym/XIOS_SERVICES/src/node/field.cpp

    r1761 r1764  
    635635 
    636636//ym          context->checkBuffersAndListen(); 
    637             context->eventLoop(); 
     637//ym            context->eventLoop(); 
     638          context->globalEventLoop(); 
    638639 
    639640          timer.suspend(); 
  • XIOS/dev/dev_ym/XIOS_SERVICES/src/server.cpp

    r1761 r1764  
    711711//      MPI_Comm_free(&intraComm); 
    712712 
     713      CXios::finalizeDaemonsManager(); 
     714       
    713715      if (!is_MPI_Initialized) 
    714716      { 
Note: See TracChangeset for help on using the changeset viewer.