Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
we should not set error flag when wait or test is called with a null request.
authorAugustin Degomme <augustin.degomme@imag.fr>
Wed, 29 Oct 2014 16:17:44 +0000 (17:17 +0100)
committerAugustin Degomme <augustin.degomme@imag.fr>
Thu, 30 Oct 2014 13:49:21 +0000 (14:49 +0100)
This is explicitly allowed by the standard.

src/smpi/smpi_pmpi.c

index 7a8e852..449a2ca 100644 (file)
@@ -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