Commit 835bf65d authored by Kenneth Moreland's avatar Kenneth Moreland
Browse files

Git rid of depricated MPI functions.

MPI depricated the use of the original functions for creating and setting
error handlers. Use the new functions when compiling with MPI 2 and above.
parent 1624380b
......@@ -227,9 +227,15 @@ IceTCommunicator icetCreateMPICommunicator(MPI_Comm mpi_comm)
MPI_Comm_dup(mpi_comm, (MPI_Comm *)comm->data);
#ifdef BREAK_ON_MPI_ERROR
#if MPI_VERSION < 2
MPI_Errhandler_create(ErrorHandler, &eh);
MPI_Errhandler_set(*((MPI_Comm *)comm->data), eh);
MPI_Errhandler_free(&eh);
#else // MPI_VERSION >= 2
MPI_Comm_create_errhandler(ErrorHandler, &eh);
MPI_Comm_set_errhandler(*((MPI_Comm *)comm->data), eh);
MPI_Errhandler_free(&eh);
#endif // MPI_VERSION >= 2
#endif
return comm;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment