Ignore:
Timestamp:
10/06/23 11:32:05 (9 months ago)
Author:
jderouillat
Message:

Specify the usage of the xios namespace to overload the MPI funtions

Location:
XIOS3/trunk/src/manager
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • XIOS3/trunk/src/manager/daemons_manager.cpp

    r2547 r2589  
    1717    MPI_Comm_rank(xiosComm,&commRank) ; 
    1818    MPI_Comm splitComm ; 
    19     MPI_Comm_split(xiosComm,isXiosServer,commRank,&splitComm) ; 
     19    xios::MPI_Comm_split(xiosComm,isXiosServer,commRank,&splitComm) ; 
    2020     
    2121    CXios::launchRegistryManager(isXiosServer) ; 
     
    2828    if (isXiosServer) CServer::launchServersRessource(splitComm) ; 
    2929    MPI_Barrier(xiosComm) ; 
    30     MPI_Comm_free(&splitComm) ; 
     30    xios::MPI_Comm_free(&splitComm) ; 
    3131  } 
    3232 
  • XIOS3/trunk/src/manager/pool_ressource.cpp

    r2580 r2589  
    1515  { 
    1616    int commRank, commSize ; 
    17     MPI_Comm_dup(poolComm, &poolComm_) ; 
     17    xios::MPI_Comm_dup(poolComm, &poolComm_) ; 
    1818    CXios::getMpiGarbageCollector().registerCommunicator(poolComm_) ; 
    1919    winNotify_ = new CWindowManager(poolComm_, maxBufferSize_,"CPoolRessource::winNotify_") ; 
     
    336336    else color=1 ;  
    337337    MPI_Comm_rank(poolComm_,&commRank) ; 
    338     MPI_Comm_split(poolComm_, color, commRank, &freeComm) ;  // workaround 
     338    xios::MPI_Comm_split(poolComm_, color, commRank, &freeComm) ;  // workaround 
    339339     
    340340    if (services_.empty())  
    341341    { 
    342342      MPI_Comm_rank(freeComm,&commRank) ; 
    343       MPI_Comm_split(freeComm, in, commRank, &serviceComm) ; 
     343      xios::MPI_Comm_split(freeComm, in, commRank, &serviceComm) ; 
    344344 
    345345      // temporary for event scheduler, we must using hierarchical split of free ressources communicator. 
     
    364364        else  partitionId = serviceCommRank / (serviceCommSize/nbPartitions + 1) ; 
    365365 
    366         MPI_Comm_split(serviceComm, partitionId, commRank, &newServiceComm) ; 
     366        xios::MPI_Comm_split(serviceComm, partitionId, commRank, &newServiceComm) ; 
    367367 
    368368        MPI_Comm_size(newServiceComm,&serviceCommSize) ; 
     
    378378        services_[std::make_tuple(serviceId,partitionId)] = new CService(newServiceComm, childScheduler, Id_, serviceId, partitionId, type, nbPartitions) ; 
    379379        
    380         MPI_Comm_free(&newServiceComm) ; 
     380        xios::MPI_Comm_free(&newServiceComm) ; 
    381381      } 
    382382      else 
     
    388388        isFirstSplit_=false ; 
    389389      } 
    390       MPI_Comm_free(&serviceComm) ; 
    391     } 
    392     MPI_Comm_free(&freeComm) ; 
     390      xios::MPI_Comm_free(&serviceComm) ; 
     391    } 
     392    xios::MPI_Comm_free(&freeComm) ; 
    393393  } 
    394394   
     
    404404        const MPI_Comm& serviceComm = service.second->getCommunicator() ; 
    405405        MPI_Comm newServiceComm ; 
    406         MPI_Comm_dup(serviceComm, &newServiceComm) ; 
     406        xios::MPI_Comm_dup(serviceComm, &newServiceComm) ; 
    407407        CXios::getMpiGarbageCollector().registerCommunicator(newServiceComm) ; 
    408408        int nbPartitions = service.second->getNbPartitions() ; 
  • XIOS3/trunk/src/manager/server_context.cpp

    r2588 r2589  
    2323   int localRank, globalRank, commSize ; 
    2424 
    25     MPI_Comm_dup(contextComm, &contextComm_) ; 
     25    xios::MPI_Comm_dup(contextComm, &contextComm_) ; 
    2626    CXios::getMpiGarbageCollector().registerCommunicator(contextComm_) ; 
    2727    xiosComm_=CXios::getXiosComm() ; 
     
    104104    { 
    105105      MPI_Comm newInterCommClient, newInterCommServer ; 
    106       MPI_Comm_dup(contextComm_,&newInterCommClient) ; 
    107       MPI_Comm_dup(contextComm_,&newInterCommServer) ; 
     106      xios::MPI_Comm_dup(contextComm_,&newInterCommClient) ; 
     107      xios::MPI_Comm_dup(contextComm_,&newInterCommServer) ; 
    108108      overlapedComm_[name_]=tuple<bool, MPI_Comm, MPI_Comm>(false, newInterCommClient, newInterCommServer) ; 
    109109      MPI_Barrier(contextComm_) ; 
     
    129129      if (nOverlap==0) 
    130130      {  
    131         MPI_Intercomm_create(intraComm, 0, xiosComm_, contextLeader, 3141, &interCommClient) ; 
     131        xios::MPI_Intercomm_create(intraComm, 0, xiosComm_, contextLeader, 3141, &interCommClient) ; 
    132132        CXios::getMpiGarbageCollector().registerCommunicator(interCommClient) ; 
    133         MPI_Comm_dup(interCommClient, &interCommServer) ; 
     133        xios::MPI_Comm_dup(interCommClient, &interCommServer) ; 
    134134        CXios::getMpiGarbageCollector().registerCommunicator(interCommServer) ; 
    135         MPI_Comm_free(&newInterCommClient) ; 
    136         MPI_Comm_free(&newInterCommServer) ; 
     135        xios::MPI_Comm_free(&newInterCommClient) ; 
     136        xios::MPI_Comm_free(&newInterCommServer) ; 
    137137      } 
    138138      else 
     
    320320    {  
    321321      info(10)<<"CServerContext::createIntercomm : No overlap ==> context in server mode"<<endl ; 
    322       MPI_Intercomm_create(contextComm_, 0, xiosComm_, remoteLeader, 3141, &interCommServer) ; 
     322      xios::MPI_Intercomm_create(contextComm_, 0, xiosComm_, remoteLeader, 3141, &interCommServer) ; 
    323323      CXios::getMpiGarbageCollector().registerCommunicator(interCommServer) ; 
    324       MPI_Comm_dup(interCommServer,&interCommClient) ; 
     324      xios::MPI_Comm_dup(interCommServer,&interCommClient) ; 
    325325      CXios::getMpiGarbageCollector().registerCommunicator(interCommClient) ; 
    326326      context_ -> createClientInterComm(interCommClient,interCommServer) ; 
     
    339339    //delete winNotify_ ; 
    340340    //winNotify_=nullptr ; 
    341     //MPI_Comm_free(&contextComm_) ; 
     341    //xios::MPI_Comm_free(&contextComm_) ; 
    342342    // don't forget intercomm -> later 
    343343  } 
  • XIOS3/trunk/src/manager/servers_ressource.cpp

    r2580 r2589  
    2222  { 
    2323 
    24     MPI_Comm_dup(serverComm, &serverComm_) ; 
     24    xios::MPI_Comm_dup(serverComm, &serverComm_) ; 
    2525    CXios::getMpiGarbageCollector().registerCommunicator(serverComm_) ;  
    2626    MPI_Comm xiosComm=CXios::getXiosComm() ; 
     
    4242    } 
    4343 
    44     MPI_Comm_dup(serverComm_, &freeRessourcesComm_) ;  
     44    xios::MPI_Comm_dup(serverComm_, &freeRessourcesComm_) ;  
    4545    CXios::getMpiGarbageCollector().registerCommunicator(freeRessourcesComm_) ; 
    4646    eventScheduler_ = make_shared<CEventScheduler>(freeRessourcesComm_) ; 
     
    225225    MPI_Comm poolComm ; 
    226226    MPI_Comm_rank(freeRessourcesComm_,&commRank) ; 
    227     MPI_Comm_split(freeRessourcesComm_, isPartOf, commRank, &poolComm) ; 
     227    xios::MPI_Comm_split(freeRessourcesComm_, isPartOf, commRank, &poolComm) ; 
    228228     
    229229    shared_ptr<CEventScheduler> parentScheduler, childScheduler ; 
     
    236236    {   
    237237      poolRessource_ = new CPoolRessource(poolComm, childScheduler, poolId, true) ; 
    238       MPI_Comm_free(&poolComm) ; 
     238      xios::MPI_Comm_free(&poolComm) ; 
    239239    } 
    240240    else  
    241241    { 
    242242      freeRessourceEventScheduler_ = childScheduler ; 
    243       MPI_Comm_free(&freeRessourcesComm_) ; 
     243      xios::MPI_Comm_free(&freeRessourcesComm_) ; 
    244244      freeRessourcesComm_=poolComm ; 
    245245    } 
  • XIOS3/trunk/src/manager/services.cpp

    r2580 r2589  
    2121    int localRank, globalRank, commSize ; 
    2222 
    23     MPI_Comm_dup(serviceComm, &serviceComm_) ; 
     23    xios::MPI_Comm_dup(serviceComm, &serviceComm_) ; 
    2424    CXios::getMpiGarbageCollector().registerCommunicator(serviceComm_) ; 
    2525    MPI_Comm globalComm_=CXios::getXiosComm() ; 
Note: See TracChangeset for help on using the changeset viewer.