_srv = false;
MPI_Barrier(MPI_COMM_WORLD);
-
+#if OMPI_MAJOR_VERSION >= 4
+ MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
+#else
MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
+#endif
if( _num_proc == 0 )
{
/* rank 0 try to be a server. If service is already published, try to be a cient */
throw std::exception();
}
}
+#if OMPI_MAJOR_VERSION >= 4
+ MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL);
+#else
MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL);
+#endif
/* If rank 0 is server, all processes call MPI_Comm_accept */
/* If rank 0 is not server, all processes call MPI_Comm_connect */