MPI_Waitsome function
Completes some out of several outstanding operations.
Syntax
int MPIAPI MPI_Waitsome(
int incount,
_Inout_count_(incount) MPI_Request array_of_requests,
_Out_ int *outcount,
_Out_cap_post_count_(incount,*outcount) int *array_of_indices,
_Out_cap_post_count_(incount,*outcount) *array_of_statuses
);
Parameters
incount
The number of entries in the array_of_requests parameter.array_of_requests
An array of MPI_Request handles of outstanding operations.outcount [out]
The number of completed requests.array_of_indices
Array of indices in the array_of_requests of operations that completed. The array_of_requests is indexed from zero in C, and from one in Fortran.array_of_statuses
Array of status objects for operations that completed, or MPI_STATUSES_IGNORE.
Return value
Returns MPI_SUCCESS on success. Otherwise, the return value is an error code.
In Fortran, the return value is stored in the IERROR parameter.
Fortran
MPI_WAITSOME(INCOUNT, ARRAY_OF_REQUESTS, OUTCOUNT, ARRAY_OF_INDICES, ARRAY_OF_STATUSES, IERROR)
INTEGER INCOUNT, ARRAY_OF_REQUESTS(*), OUTCOUNT, ARRAY_OF_INDICES(*),
ARRAY_OF_STATUSES(MPI_STATUS_SIZE,*), IERROR
Remarks
The array of indicies are in the range 0 to incount - 1 for C and in the range 1 to incount for Fortran.
NULL requests are ignored; if all requests are NULL, then the routine returns with outcount set to MPI_UNDEFINED.
While it is possible to list a request handle more than once in the array_of_requests, such an action is considered erroneous and may cause the program to unexecpectedly terminate or produce incorrect results.
MPI_Waitsome provides an interface much like the Unix 'select' or 'poll' calls and, in a high qualilty implementation, indicates all of the requests that have completed when MPI_Waitsome is called. However, MPI_Waitsome only guarantees that at least one request has completed; there is no guarantee that all completed requests will be returned, or that the entries in array_of_indices will be in increasing order. Also, requests that are completed while MPI_Waitsome is executing may or may not be returned, depending on the timing of the completion of the message.
Requirements
Product |
HPC Pack 2012 MS-MPI Redistributable Package, HPC Pack 2008 R2 MS-MPI Redistributable Package, HPC Pack 2008 MS-MPI Redistributable Package or HPC Pack 2008 Client Utilities |
Header |
Mpi.h; Mpif.h |
Library |
Msmpi.lib |
DLL |
Msmpi.dll |