Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
set default error handler to MPI_ERRORS_ARE_FATAL, as in a proper MPI implementation
[simgrid.git] / src / smpi / mpi / smpi_win.cpp
index 095f870..953584f 100644 (file)
@@ -42,7 +42,7 @@ Win::Win(void *base, MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm,
     bar_ = new s4u::Barrier(comm_size);
   }
   mode_=0;
-
+  errhandler_=MPI_ERRORS_ARE_FATAL;
   comm->add_rma_win(this);
   comm->ref();
 
@@ -737,5 +737,16 @@ int Win::shared_query(int rank, MPI_Aint* size, int* disp_unit, void* baseptr)
   }
   return MPI_SUCCESS;
 }
+
+MPI_Errhandler Win::errhandler(){
+  return errhandler_;
+}
+
+void Win::set_errhandler(MPI_Errhandler errhandler){
+  errhandler_=errhandler;
+  if(errhandler_!= MPI_ERRHANDLER_NULL)
+    errhandler->ref();
+}
+
 }
 }