From 8e30492d485bb2dcec5ab91f271fd44fbb82f06e Mon Sep 17 00:00:00 2001 From: Augustin Degomme Date: Wed, 29 Oct 2014 17:17:44 +0100 Subject: [PATCH 1/1] we should not set error flag when wait or test is called with a null request. This is explicitly allowed by the standard. --- src/smpi/smpi_pmpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/smpi/smpi_pmpi.c b/src/smpi/smpi_pmpi.c index 7a8e852c5f..449a2cadd4 100644 --- a/src/smpi/smpi_pmpi.c +++ b/src/smpi/smpi_pmpi.c @@ -1379,7 +1379,7 @@ int PMPI_Test(MPI_Request * request, int *flag, MPI_Status * status) } else if (*request == MPI_REQUEST_NULL) { *flag= TRUE; smpi_empty_status(status); - retval = MPI_ERR_REQUEST; + retval = MPI_SUCCESS; } else { #ifdef HAVE_TRACING int rank = request && (*request)->comm != MPI_COMM_NULL @@ -1486,7 +1486,7 @@ int PMPI_Wait(MPI_Request * request, MPI_Status * status) if (request == NULL) { retval = MPI_ERR_ARG; } else if (*request == MPI_REQUEST_NULL) { - retval = MPI_ERR_REQUEST; + retval = MPI_SUCCESS; } else { #ifdef HAVE_TRACING -- 2.20.1