1
1

MPI_TESTANY is described in MPI-1 p46. The last 2 full paragraphs of

the page address three situations:

1. if the array of requests are all REQUEST_NULL, set flag=true and
   index=MPI_UNDEFINED
2. if the array of requests are not all REQUEST_NULL, if any of them
   finished, set flag=true and index=whatever_the_index_was
3. if the array of requests are not all REQUEST_NULL, if none of them
   finished, set flag=false and index=MPI_UNDEFINED

With regards to the index value, we are currently doing 1 and 2, but
not 3.  More specifically, index should be set to MPI_UNDEFINED if no
requests are found to have completed (regardless of whether they are
REQUEST_NULL or not).

This patch fixes this problem.

This commit was SVN r8319.
Этот коммит содержится в:
Jeff Squyres 2005-11-29 23:41:04 +00:00
родитель 13b8e166ba
Коммит 20eebeaa14

Просмотреть файл

@ -53,13 +53,13 @@ int ompi_request_test_any(
}
/* Only fall through here if we found nothing */
*index = MPI_UNDEFINED;
if(num_requests_null_inactive != count) {
*completed = false;
#if OMPI_ENABLE_PROGRESS_THREADS == 0
opal_progress();
#endif
} else {
*index = MPI_UNDEFINED;
*completed = true;
if (MPI_STATUS_IGNORE != status) {
*status = ompi_status_empty;