Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Completes one out of several outstanding operations.
Syntax
int MPIAPI MPI_Waitany(
int count,
_Inout_count_(count) MPI_Request *array_of_requests,
_Out_ int *index,
_Out_ MPI_Status *status
);
Parameters
count
The number of entries in the array_of_requests parameter.array_of_requests
An array of MPI_Request handles of outstanding operations.index [out]
A pointer to an integer that indicates the index in the array_of_requests parameter of the operation that is completed. The array is indexed from zero in C, and from one in Fortran.status [out]
A pointer to an MPI_Status object that describes the completed operation.
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_WAITANY(COUNT, ARRAY_OF_REQUESTS, INDEX, STATUS, IERROR)
INTEGER COUNT, ARRAY_OF_REQUESTS, INDEX, STATUS(MPI_STATUS_SIZE), IERROR
Remarks
This function is a non-local operation. Successful completion might depend on matching operations at other processes.
This function returns when one of the operations that is associated with active requests in the array_of_requests parameter is completed. If more than one outstanding operation is completed, one is arbitrarily chosen. If the completed operation is a persistent communication operation, the persistent request is marked as inactive. A nonpersistent operation is deallocated, and its corresponding entry in the array_of_requests parameter is set to MPI_REQUEST_NULL.
Entries in the array_of_requests parameter can be MPI_REQUEST_NULL or a handle to an inactive persistent communication request. If the count parameter is zero, or all entries in array_of_requests are MPI_REQUEST_NULL or inactive persistent communication requests, then the function returns immediately with the index parameter set to MPI_UNDEFINED and an empty status.
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 |