5.2.2. Communication Completion under Partitioning

PreviousUpNext
Up: Semantics of Partitioned Point-to-Point Communication Next: Semantics of Communications in Partitioned Mode Previous: Communication Initialization and Starting with Partitioning

The functions MPI_WAIT and MPI_TEST (and variants) are used to complete a partitioned communication operation. The completion of a partitioned send operation indicates that the sender is now free to call MPI_START/ MPI_STARTALL to restart the operation and subsequently MPI_PREADY, MPI_PREADY_RANGE or MPI_PREADY_LIST. Alternatively, the user can safely free the partitioned communication request after the completion of the partitioned operation. For the sending process, completion of the partitioned send operation does not indicate that the partitions of the message have all been received.

The completion of a partitioned receive operation through MPI_WAIT or MPI_TEST indicates that the receive buffer contains all of the partitions. A function for probing the partial reception of the receive buffer is provided by MPI_PARRIVED. The MPI_PARRIVED function can be used to determine if the message data for the indicated partition has been received into the receive buffer. Upon success, the receiver becomes free to access the indicated partition (as well as any others that previously completed for that operation).

MPI_PARRIVED(request, partition, flag)
IN requestpartitioned communication request (handle)
IN partitionpartition to be tested (non-negative integer)
OUT flag true if operation completed on the specified partition, false if not (logical)
C binding
int MPI_Parrived(MPI_Request request, int partition, int *flag)
Fortran 2008 binding
MPI_Parrived(request, partition, flag, ierror)

TYPE(MPI_Request), INTENT(IN) :: request
INTEGER, INTENT(IN) :: partition
LOGICAL, INTENT(OUT) :: flag
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
Fortran binding
MPI_PARRIVED(REQUEST, PARTITION, FLAG, IERROR)

INTEGER REQUEST, PARTITION, IERROR
LOGICAL FLAG

The function MPI_PARRIVED can be used to test partial completion of partitioned receive operations. A call to MPI_PARRIVED on an active partitioned communication request returns flag = true if the operation identified by request for the specified partition is complete. The request is not marked as complete/inactive by this procedure. A subsequent call to an MPI completing procedure (e.g., MPI_TEST/ MPI_WAIT) is required to complete the operation, as described in Chapter Point-to-Point Communication. MPI_PARRIVED may be called multiple times for a partition. MPI_PARRIVED may be called with a null or inactive request argument. In either case, the operation returns with flag = true. Calling MPI_PARRIVED on a request that does not correspond to a partitioned receive operation is erroneous.

Repeated calls to MPI_PARRIVED with the same request and partition arguments will eventually return flag = true if the corresponding partitioned send operation has been started and all send partitions have been marked as ready. For additional information on MPI progress see Sections Progress and Semantics of Nonblocking Communication Operations.


Advice to implementors.

A high quality implementation will eventually return flag = true from MPI_PARRIVED after all of the corresponding MPI_PREADY calls have been made for a receive-side partition, even if other send partitions are not yet marked as ready. ( End of advice to implementors.)


PreviousUpNext
Up: Semantics of Partitioned Point-to-Point Communication Next: Semantics of Communications in Partitioned Mode Previous: Communication Initialization and Starting with Partitioning


Return to MPI-4.1 Standard Index
Return to MPI Forum Home Page

(Unofficial) MPI-4.1 of November 2, 2023
HTML Generated on November 19, 2023