From: Christian Heinrich Date: Tue, 14 Jun 2016 14:06:37 +0000 (+0200) Subject: [SMPI] Fix wrong return value in MPI_Testany. X-Git-Tag: v3_14~987^2~6^2~1 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/efcf0fb465cf0465c462fc28a830ccd4d6b6b13c [SMPI] Fix wrong return value in MPI_Testany. See the MPI Standard on this function: flag must be true if and only if there was at least one operation completed. --- diff --git a/src/smpi/smpi_base.cpp b/src/smpi/smpi_base.cpp index 011c539613..ccc85cda09 100644 --- a/src/smpi/smpi_base.cpp +++ b/src/smpi/smpi_base.cpp @@ -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);