Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Revert "[SMPI] Fix wrong return value in MPI_Testany."
authorChristian Heinrich <franz-christian.heinrich@inria.fr>
Wed, 15 Jun 2016 08:26:44 +0000 (10:26 +0200)
committerChristian Heinrich <franz-christian.heinrich@inria.fr>
Wed, 15 Jun 2016 08:26:44 +0000 (10:26 +0200)
This reverts commit efcf0fb465cf0465c462fc28a830ccd4d6b6b13c.

The reason I reverted again is that the standard does actually state

"The array may contain null or inactive handles. If the array contains
no active handles then the call returns immediately with flag = true,
index = MPI_UNDEFINED , and an empty status."

This is a corner case and was correctly handled here.

src/smpi/smpi_base.cpp

index ccc85cd..011c539 100644 (file)
@@ -805,7 +805,8 @@ int smpi_mpi_testany(int count, MPI_Request requests[], int *index, MPI_Status *
       nsleeps++;
     }
   } else {
-      flag = 0; // all requests are null or inactive, return false
+      //all requests are null or inactive, return true
+      flag = 1;
       smpi_empty_status(status);
   }
   xbt_dynar_free(&comms);