-// Copyright (C) 2011-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2011-2020 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
MPI_Comm_rank( MPI_COMM_WORLD, &rank );
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
+
#ifdef HAVE_MPI2
MPI_Info_create(&info);
MPI_Info_set(info, "ompi_unique", "true");
exit(1);
}
}
+#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
MPI_Bcast(&srv,1,MPI_INT,0,MPI_COMM_WORLD);
if ( srv )
MPI_Comm_accept( port_name, MPI_INFO_NULL, 0, MPI_COMM_WORLD, &icom );