diff --git a/ompi/mpi/c/testall.c b/ompi/mpi/c/testall.c index 9155ac6d5b..ba2c843492 100644 --- a/ompi/mpi/c/testall.c +++ b/ompi/mpi/c/testall.c @@ -67,6 +67,7 @@ int MPI_Testall(int count, MPI_Request requests[], int *flag, } if (OPAL_UNLIKELY(0 == count)) { + *flag = true; return MPI_SUCCESS; } diff --git a/ompi/mpi/c/testany.c b/ompi/mpi/c/testany.c index 21e09752da..c2f2a50828 100644 --- a/ompi/mpi/c/testany.c +++ b/ompi/mpi/c/testany.c @@ -67,6 +67,8 @@ int MPI_Testany(int count, MPI_Request requests[], int *indx, int *completed, MP } if (OPAL_UNLIKELY(0 == count)) { + *completed = true; + *indx = MPI_UNDEFINED; return MPI_SUCCESS; } diff --git a/ompi/mpi/c/testsome.c b/ompi/mpi/c/testsome.c index 4033e2ac7f..3f58d7853c 100644 --- a/ompi/mpi/c/testsome.c +++ b/ompi/mpi/c/testsome.c @@ -69,6 +69,7 @@ int MPI_Testsome(int incount, MPI_Request *requests, } if (OPAL_UNLIKELY(0 == incount)) { + *outcount = MPI_UNDEFINED; return OMPI_SUCCESS; } diff --git a/ompi/mpi/c/waitany.c b/ompi/mpi/c/waitany.c index e2c0c4ed8a..895575d3aa 100644 --- a/ompi/mpi/c/waitany.c +++ b/ompi/mpi/c/waitany.c @@ -67,6 +67,7 @@ int MPI_Waitany(int count, MPI_Request *requests, int *indx, MPI_Status *status) } if (OPAL_UNLIKELY(0 == count)) { + *indx = MPI_UNDEFINED; return MPI_SUCCESS; } diff --git a/ompi/mpi/c/waitsome.c b/ompi/mpi/c/waitsome.c index 3fc8bf8df3..bcddcb1530 100644 --- a/ompi/mpi/c/waitsome.c +++ b/ompi/mpi/c/waitsome.c @@ -69,6 +69,7 @@ int MPI_Waitsome(int incount, MPI_Request *requests, } if (OPAL_UNLIKELY(0 == incount)) { + *outcount = MPI_UNDEFINED; return MPI_SUCCESS; }