X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6d004c352f7b26fba38486001f874e65466b5bee..98755faee042e94d1ff52f6e9508b18015bb1ae5:/src/smpi/mpi/smpi_comm.cpp diff --git a/src/smpi/mpi/smpi_comm.cpp b/src/smpi/mpi/smpi_comm.cpp index b03c34043b..a670b30bcd 100644 --- a/src/smpi/mpi/smpi_comm.cpp +++ b/src/smpi/mpi/smpi_comm.cpp @@ -39,6 +39,7 @@ Comm::Comm(MPI_Group group, MPI_Topology topo, int smp, int in_id) : group_(grou leaders_map_ = nullptr; is_blocked_ = 0; info_ = MPI_INFO_NULL; + errhandler_ = MPI_ERRORS_RETURN; static int global_id_=0; //First creation of comm is done before SIMIX_run, so only do comms for others if(in_id==MPI_UNDEFINED && smp==0 && this->rank()!=MPI_UNDEFINED ){ @@ -106,6 +107,8 @@ int Comm::dup(MPI_Comm* newcomm){ //duplicate info if present if(info_!=MPI_INFO_NULL) (*newcomm)->info_ = new simgrid::smpi::Info(info_); + //duplicate errhandler + (*newcomm)->set_errhandler(errhandler_); return ret; } @@ -547,6 +550,16 @@ void Comm::set_info(MPI_Info info){ info_=info; } +MPI_Errhandler Comm::errhandler(){ + return errhandler_; +} + +void Comm::set_errhandler(MPI_Errhandler errhandler){ + errhandler_=errhandler; + if(errhandler_!= MPI_ERRHANDLER_NULL) + errhandler->ref(); +} + MPI_Comm Comm::split_type(int type, int /*key*/, MPI_Info) { //MPI_UNDEFINED can be given to some nodes... but we need them to still perform the smp part which is collective