Changeset 2584
- Timestamp:
- 10/05/23 16:02:02 (16 months ago)
- Location:
- XIOS3/trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS3/trunk/src/mpi.hpp
r2576 r2584 31 31 #include "mpi_tools.hpp" 32 32 33 inline int MPI_Comm_dup(MPI_Comm comm, MPI_Comm * newcomm) 33 namespace xios 34 34 { 35 int ret=PMPI_Comm_dup(comm, newcomm) ; 36 xios::CCommTrack::registerComm(*newcomm) ; 37 return ret ; 35 inline int MPI_Comm_dup(::MPI_Comm comm, ::MPI_Comm * newcomm) 36 { 37 int ret=::MPI_Comm_dup(comm, newcomm) ; 38 xios::CCommTrack::registerComm(*newcomm) ; 39 return ret ; 40 } 41 42 inline int MPI_Intercomm_create(::MPI_Comm local_comm, int local_leader, 43 ::MPI_Comm peer_comm, int remote_leader, int tag, ::MPI_Comm * newintercomm) 44 { 45 int ret=::MPI_Intercomm_create(local_comm, local_leader, peer_comm, remote_leader, tag, newintercomm) ; 46 xios::CCommTrack::registerComm(*newintercomm) ; 47 return ret ; 48 } 49 50 inline int MPI_Intercomm_merge(::MPI_Comm intercomm, int high, ::MPI_Comm * newintracomm) 51 { 52 int ret=::MPI_Intercomm_merge(intercomm, high, newintracomm) ; 53 xios::CCommTrack::registerComm(*newintracomm) ; 54 return ret ; 55 } 56 57 inline int MPI_Comm_split(::MPI_Comm comm, int color, int key, ::MPI_Comm * newcomm) 58 { 59 int ret=::MPI_Comm_split(comm, color, key,newcomm) ; 60 xios::CCommTrack::registerComm(*newcomm) ; 61 return ret ; 62 } 63 64 inline int MPI_Comm_create(::MPI_Comm comm, ::MPI_Group group, ::MPI_Comm *newcomm) 65 { 66 int ret=::MPI_Comm_create(comm, group, newcomm) ; 67 xios::CCommTrack::registerComm(*newcomm) ; 68 return ret ; 69 } 70 71 inline int MPI_Comm_free(::MPI_Comm *comm) 72 { 73 xios::CCommTrack::releaseComm(*comm) ; 74 return ::MPI_Comm_free(comm) ; 75 } 38 76 } 39 77 40 inline int MPI_Intercomm_create(MPI_Comm local_comm, int local_leader,41 MPI_Comm peer_comm, int remote_leader, int tag, MPI_Comm * newintercomm)42 {43 int ret=PMPI_Intercomm_create(local_comm, local_leader, peer_comm, remote_leader, tag, newintercomm) ;44 xios::CCommTrack::registerComm(*newintercomm) ;45 return ret ;46 }47 48 inline int MPI_Intercomm_merge(MPI_Comm intercomm, int high, MPI_Comm * newintracomm)49 {50 int ret=PMPI_Intercomm_merge(intercomm, high, newintracomm) ;51 xios::CCommTrack::registerComm(*newintracomm) ;52 return ret ;53 }54 55 inline int MPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm * newcomm)56 {57 int ret=PMPI_Comm_split(comm, color, key,newcomm) ;58 xios::CCommTrack::registerComm(*newcomm) ;59 return ret ;60 }61 62 inline int MPI_Comm_create(MPI_Comm comm, MPI_Group group, MPI_Comm *newcomm)63 {64 int ret=PMPI_Comm_create(comm, group, newcomm) ;65 xios::CCommTrack::registerComm(*newcomm) ;66 return ret ;67 }68 69 inline int MPI_Comm_free(MPI_Comm *comm)70 {71 xios::CCommTrack::releaseComm(*comm) ;72 return PMPI_Comm_free(comm) ;73 }74 75 76 78 #endif -
XIOS3/trunk/src/mpi_tools.cpp
r2580 r2584 22 22 { 23 23 auto it = commTrack_.find(comm) ; 24 if (it == commTrack_.end()) info(100)<<"WARNING : CCommtrack::releaseComm => Communicator not allocated !" << endl ; 24 //if (it == commTrack_.end()) info(100)<<"WARNING : CCommtrack::releaseComm => Communicator not allocated !" << endl ; 25 if (it == commTrack_.end()) { ERROR("void CCommTrack::releaseComm(const MPI_Comm& comm)",<<"Communicator not allocated !" << endl) ; } 25 26 else commTrack_.erase(it) ; 26 27 }
Note: See TracChangeset
for help on using the changeset viewer.