Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[SMPI] Fix wrong return value in MPI_Testany.
authorChristian Heinrich <franz-christian.heinrich@inria.fr>
Tue, 14 Jun 2016 14:06:37 +0000 (16:06 +0200)
committerChristian Heinrich <franz-christian.heinrich@inria.fr>
Tue, 14 Jun 2016 14:06:37 +0000 (16:06 +0200)
See the MPI Standard on this function: flag must be true
if and only if there was at least one operation completed.

src/smpi/smpi_base.cpp

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