Ignore:
Timestamp:
09/26/23 17:24:35 (10 months ago)
Author:
ymipsl
Message:

Tracking unfree MPI windows and communicators.

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS3/trunk/src/client.cpp

    r2576 r2580  
    106106 
    107107          MPI_Comm_split(globalComm, color, commRank, &clientComm) ; 
     108          CXios::getMpiGarbageCollector().registerCommunicator(clientComm) ; 
    108109        } 
    109110        else 
     
    115116      { 
    116117        MPI_Comm_dup(localComm,&clientComm) ; 
     118        CXios::getMpiGarbageCollector().registerCommunicator(clientComm) ; 
    117119        MPI_Comm_dup(localComm,&intraComm_) ; 
     120        CXios::getMpiGarbageCollector().registerCommunicator(intraComm_) ; 
    118121 
    119122        if (CXios::usingServer) 
     
    175178      MPI_Comm_rank(CXios::getXiosComm(), &commRank) ; 
    176179      MPI_Comm_split(CXios::getXiosComm(),false,commRank, &clientsComm_) ; 
     180      CXios::getMpiGarbageCollector().registerCommunicator(clientsComm_) ; 
    177181       
    178182      // is using server or not ? 
     
    277281        {   
    278282          MPI_Intercomm_create(intraComm, 0, globalComm, serverRank, 3141, &interComm); 
     283          CXios::getMpiGarbageCollector().registerCommunicator(interComm) ; 
    279284          MPI_Comm_free(&intraComm) ; 
    280285          MPI_Intercomm_merge(interComm,high, &intraComm ) ; 
     
    341346      CXios::setXiosComm(xiosGlobalComm) ; 
    342347 
    343       MPI_Comm commUnfree ; 
    344       MPI_Comm_dup(clientComm, &commUnfree ) ; 
    345   
    346348    } 
    347349 
     
    519521      finalizePoolRessource() ; 
    520522      CContext::removeAllContexts() ; // free memory for related context  
    521  
    522523      CXios::getMpiGarbageCollector().release() ; // release unfree MPI ressources 
     524      MPI_Comm xiosComm=CXios::getXiosComm() ; 
     525      MPI_Comm_free(&xiosComm) ; 
    523526      CCommTrack::dumpComm() ; 
    524527      if (!is_MPI_Initialized) 
Note: See TracChangeset for help on using the changeset viewer.