leaders_map_ = nullptr;
is_blocked_ = 0;
info_ = MPI_INFO_NULL;
+ errhandler_ = MPI_ERRORS_ARE_FATAL;
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 ){
//duplicate info if present
if(info_!=MPI_INFO_NULL)
(*newcomm)->info_ = new simgrid::smpi::Info(info_);
+ //duplicate errhandler
+ (*newcomm)->set_errhandler(errhandler_);
return ret;
}
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