diff --git a/NEWS b/NEWS index 0629dd6a66..2b30b73932 100644 --- a/NEWS +++ b/NEWS @@ -64,6 +64,14 @@ version 1.0. - Addition of UDAPL BTL ("udapl"). +1.1.3 +----- + +- Fix several MPI_*ERRHANDLER* functions with respect to what + arguments they allowed and the behavior that they effected. Thanks + to Lisandro Dalcin for reporting the problems. + + 1.1.2 ----- diff --git a/ompi/mpi/c/errhandler_free.c b/ompi/mpi/c/errhandler_free.c index a98c87b2f0..87d8978e14 100644 --- a/ompi/mpi/c/errhandler_free.c +++ b/ompi/mpi/c/errhandler_free.c @@ -37,8 +37,7 @@ int MPI_Errhandler_free(MPI_Errhandler *errhandler) if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); - if (NULL == errhandler || - ompi_errhandler_is_intrinsic(*errhandler)) { + if (NULL == errhandler) { return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, "MPI_Errhandler_free"); } diff --git a/ompi/mpi/c/file_delete.c b/ompi/mpi/c/file_delete.c index 38843e80c6..ae5af54eac 100644 --- a/ompi/mpi/c/file_delete.c +++ b/ompi/mpi/c/file_delete.c @@ -50,7 +50,7 @@ int MPI_File_delete(char *filename, MPI_Info info) OMPI_ERRHANDLER_CHECK(rc, MPI_FILE_NULL, rc, FUNC_NAME); } - /* Note that MPI-2:9.7 (p265) says that errors in MPI_FILE_OPEN + /* Note that MPI-2:9.7 (p261) says that errors in MPI_FILE_OPEN (before the file handle is created) should invoke the default error handler on MPI_FILE_NULL. Hence, if we get a file handle out of ompi_file_open(), invoke the error handler on that. If diff --git a/ompi/mpi/c/file_get_errhandler.c b/ompi/mpi/c/file_get_errhandler.c index 6755262b0c..d35415011e 100644 --- a/ompi/mpi/c/file_get_errhandler.c +++ b/ompi/mpi/c/file_get_errhandler.c @@ -38,8 +38,11 @@ int MPI_File_get_errhandler( MPI_File file, MPI_Errhandler *errhandler) if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); - if (NULL == file || - MPI_FILE_NULL == file) { + + /* Note that MPI-2:9.7 (p261) explicitly says that you are + allowed to set the error handler on MPI_FILE_NULL */ + + if (NULL == file) { return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_FILE, "MPI_File_get_errhandler"); } else if (NULL == errhandler) { diff --git a/ompi/mpi/c/file_open.c b/ompi/mpi/c/file_open.c index 44b86d4a3d..534154265c 100644 --- a/ompi/mpi/c/file_open.c +++ b/ompi/mpi/c/file_open.c @@ -56,7 +56,7 @@ int MPI_File_open(MPI_Comm comm, char *filename, int amode, } - /* Note that MPI-2:9.7 (p265) says that errors in MPI_FILE_OPEN + /* Note that MPI-2:9.7 (p261) says that errors in MPI_FILE_OPEN (before the file handle is created) should invoke the default error handler on MPI_FILE_NULL. Hence, if we get a file handle out of ompi_file_open(), invoke the error handler on that. If diff --git a/ompi/mpi/c/file_set_errhandler.c b/ompi/mpi/c/file_set_errhandler.c index db37c538c4..54152d25a3 100644 --- a/ompi/mpi/c/file_set_errhandler.c +++ b/ompi/mpi/c/file_set_errhandler.c @@ -39,7 +39,7 @@ int MPI_File_set_errhandler( MPI_File file, MPI_Errhandler errhandler) if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); - /* Note that MPI-2:9.7 (p265) explicitly says that you are + /* Note that MPI-2:9.7 (p261) explicitly says that you are allowed to set the error handler on MPI_FILE_NULL */ if (NULL == file) {