diff --git a/src/mpi/c/comm_call_errhandler.c b/src/mpi/c/comm_call_errhandler.c index a04dc8b351..e9452c13f7 100644 --- a/src/mpi/c/comm_call_errhandler.c +++ b/src/mpi/c/comm_call_errhandler.c @@ -47,6 +47,9 @@ int MPI_Comm_call_errhandler(MPI_Comm comm, int errorcode) /* Invoke the errhandler */ - return OMPI_ERRHANDLER_INVOKE(comm, errorcode, FUNC_NAME); + OMPI_ERRHANDLER_INVOKE(comm, errorcode, FUNC_NAME); + + /* See MPI-2 8.5 why this function has to return MPI_SUCCESS */ + return MPI_SUCCESS; } diff --git a/src/mpi/c/file_call_errhandler.c b/src/mpi/c/file_call_errhandler.c index 3ec22f8384..f17c400f59 100644 --- a/src/mpi/c/file_call_errhandler.c +++ b/src/mpi/c/file_call_errhandler.c @@ -46,6 +46,9 @@ int MPI_File_call_errhandler(MPI_File fh, int errorcode) } /* Invoke the errhandler */ + OMPI_ERRHANDLER_INVOKE(fh, errorcode, FUNC_NAME); + + /* See MPI-2 8.5 why this function has to return MPI_SUCCESS */ + return MPI_SUCCESS; - return OMPI_ERRHANDLER_INVOKE(fh, errorcode, FUNC_NAME); } diff --git a/src/mpi/c/win_call_errhandler.c b/src/mpi/c/win_call_errhandler.c index daaed1d515..1a971106ce 100644 --- a/src/mpi/c/win_call_errhandler.c +++ b/src/mpi/c/win_call_errhandler.c @@ -48,5 +48,8 @@ int MPI_Win_call_errhandler(MPI_Win win, int errorcode) /* Invoke the errhandler */ - return OMPI_ERRHANDLER_INVOKE(win, errorcode, FUNC_NAME); + OMPI_ERRHANDLER_INVOKE(win, errorcode, FUNC_NAME); + /* See MPI-2 8.5 why this function has to return MPI_SUCCESS */ + return MPI_SUCCESS; + }