From cff96d166c09ca86f6ed3563bb47fbdeddfbc80a Mon Sep 17 00:00:00 2001 From: Christian Heinrich Date: Wed, 15 Jun 2016 10:26:44 +0200 Subject: [PATCH] Revert "[SMPI] Fix wrong return value in MPI_Testany." 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/smpi/smpi_base.cpp b/src/smpi/smpi_base.cpp index ccc85cda09..011c539613 100644 --- a/src/smpi/smpi_base.cpp +++ b/src/smpi/smpi_base.cpp @@ -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); -- 2.20.1