summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5FDmpi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/H5FDmpi.c b/src/H5FDmpi.c
index 16be455..98e1b1a 100644
--- a/src/H5FDmpi.c
+++ b/src/H5FDmpi.c
@@ -315,6 +315,11 @@ H5FD_mpi_comm_info_dup(MPI_Comm comm, MPI_Info info, MPI_Comm *comm_new, MPI_Inf
info_dup = info;
}
+ /* Set MPI_ERRORS_RETURN on comm_dup so that MPI failures are not fatal,
+ and return codes can be checked and handled. May 23, 2017 FTW */
+ if (MPI_SUCCESS != (mpi_code = MPI_Comm_set_errhandler(comm_dup, MPI_ERRORS_RETURN)))
+ HMPI_GOTO_ERROR(FAIL, "MPI_Errhandler_set failed", mpi_code)
+
/* copy them to the return arguments */
*comm_new = comm_dup;
*info_new = info_dup;