5.2.1. Communication Initialization and Starting with Partitioning

PreviousUpNext
Up: Semantics of Partitioned Point-to-Point Communication Next: Communication Completion under Partitioning Previous: Semantics of Partitioned Point-to-Point Communication

Initialization of partitioned communication operations use the initialization calls described below. Subsequent to initialization, MPI_START/ MPI_STARTALL are used as the first indication to MPI that a message transfer will occur. For send-side operations, neither initializing nor starting the operation enables transfer of any part of the user buffer. Freeing or canceling a partitioned communication request that is active (i.e., initialized and started) and not completed is erroneous. After the partitioned communication operation is started, individual partitions of a message are indicated as ready to be sent by MPI via the MPI_PREADY function, described below.

MPI_PSEND_INIT(buf, partitions, count, datatype, dest, tag, comm, info, request)
IN bufinitial address of send buffer (choice)
IN partitionsnumber of partitions (non-negative integer)
IN countnumber of elements sent per partition (non-negative integer)
IN datatypetype of each element (handle)
IN destrank of destination (integer)
IN tagmessage tag (integer)
IN commcommunicator (handle)
IN infoinfo argument (handle)
OUT requestcommunication request (handle)
C binding
int MPI_Psend_init(const void *buf, int partitions, MPI_Count count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Info info, MPI_Request *request)
Fortran 2008 binding
MPI_Psend_init(buf, partitions, count, datatype, dest, tag, comm, info, request, ierror)

TYPE(*), DIMENSION(..), INTENT(IN) :: buf
INTEGER, INTENT(IN) :: partitions, dest, tag
INTEGER(KIND=MPI_COUNT_KIND), INTENT(IN) :: count
TYPE(MPI_Datatype), INTENT(IN) :: datatype
TYPE(MPI_Comm), INTENT(IN) :: comm
TYPE(MPI_Info), INTENT(IN) :: info
TYPE(MPI_Request), INTENT(OUT) :: request
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
Fortran binding
MPI_PSEND_INIT(BUF, PARTITIONS, COUNT, DATATYPE, DEST, TAG, COMM, INFO, REQUEST, IERROR)

<type> BUF(*)
INTEGER PARTITIONS, DATATYPE, DEST, TAG, COMM, INFO, REQUEST, IERROR
INTEGER(KIND=MPI_COUNT_KIND) COUNT

MPI_PSEND_INIT creates a partitioned communication request and binds to it all the arguments of a partitioned send operation. Matching follows the same MPI matching rules as for point-to-point communication (see Chapter Point-to-Point Communication) with communicator, tag, and source dictating message matching. In the event that the communicator, tag, and source do not uniquely identify a message, the order in which partitioned communication initialization calls are made is the order in which they will eventually match. This operation can only match with partitioned communication initialization operations, therefore it is required to be matched with a corresponding MPI_PRECV_INIT call. Partitioned communication initialization calls are local. It is erroneous to provide a partitions value Image file . Send-side and receive-side buffers must be identical in size.


Advice to implementors.

Unlike MPI_SEND_INIT, MPI_PSEND_INIT can be matched as early as the initialization call. Also, unlike MPI_SEND_INIT, MPI_PSEND_INIT takes an info argument. ( End of advice to implementors.)

MPI_PRECV_INIT(buf, partitions, count, datatype, source, tag, comm, info, request)
IN bufinitial address of recv buffer (choice)
IN partitionsnumber of partitions (non-negative integer)
IN countnumber of elements received per partition (non-negative integer)
IN datatypetype of each element (handle)
IN sourcerank of source (integer)
IN tagmessage tag (integer)
IN commcommunicator (handle)
IN infoinfo argument (handle)
OUT requestcommunication request (handle)
C binding
int MPI_Precv_init(void *buf, int partitions, MPI_Count count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Info info, MPI_Request *request)
Fortran 2008 binding
MPI_Precv_init(buf, partitions, count, datatype, source, tag, comm, info, request, ierror)

TYPE(*), DIMENSION(..), INTENT(IN) :: buf
INTEGER, INTENT(IN) :: partitions, source, tag
INTEGER(KIND=MPI_COUNT_KIND), INTENT(IN) :: count
TYPE(MPI_Datatype), INTENT(IN) :: datatype
TYPE(MPI_Comm), INTENT(IN) :: comm
TYPE(MPI_Info), INTENT(IN) :: info
TYPE(MPI_Request), INTENT(OUT) :: request
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
Fortran binding
MPI_PRECV_INIT(BUF, PARTITIONS, COUNT, DATATYPE, SOURCE, TAG, COMM, INFO, REQUEST, IERROR)

<type> BUF(*)
INTEGER PARTITIONS, DATATYPE, SOURCE, TAG, COMM, INFO, REQUEST, IERROR
INTEGER(KIND=MPI_COUNT_KIND) COUNT


Rationale.

The info argument is provided in order to support per-operation implementationdefined info keys. ( End of rationale.)
MPI_PRECV_INIT creates a partitioned communication receive request and binds to it all the arguments of a partitioned receive operation. This operation can only match with partitioned communication initialization operations, therefore the MPI library is required to match MPI_PRECV_INIT calls only with a corresponding MPI_PSEND_INIT call. Matching follows the same MPI matching rules as for point-to-point communication (see Chapter Point-to-Point Communication) with communicator, tag, and source dictating message matching. In the event that the communicator, tag, and source do not uniquely identify a message, the order in which partitioned communication initialization calls are made is the order in which they will eventually match. Partitioned communication initialization calls are local. That is, MPI_PRECV_INIT may return before the operation completes. It is erroneous to provide a partitions value Image file . Wildcards for source and tag are not allowed.


Advice to implementors.

Unlike MPI_RECV_INIT, MPI_PRECV_INIT may communicate. Also unlike MPI_RECV_INIT, MPI_PRECV_INIT takes an info argument. ( End of advice to implementors.)

MPI_PREADY(partition, request)
IN partitionpartition to mark ready for transfer (non-negative integer)
INOUT requestpartitioned communication request (handle)
C binding
int MPI_Pready(int partition, MPI_Request request)
Fortran 2008 binding
MPI_Pready(partition, request, ierror)

INTEGER, INTENT(IN) :: partition
TYPE(MPI_Request), INTENT(IN) :: request
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
Fortran binding
MPI_PREADY(PARTITION, REQUEST, IERROR)

INTEGER PARTITION, REQUEST, IERROR

MPI_PREADY is a send-side call that indicates that a given partition is ready to be transferred. It is erroneous to use MPI_PREADY on any request object that does not correspond to a partitioned send operation. The partitioning is defined by the MPI_PSEND_INIT call. Partition numbering starts at zero and ranges to one less than the number of partitions declared in the MPI_PSEND_INIT call. Specifying a partition number that is equal to or larger than the number of partitions is erroneous. After a call to MPI_START/ MPI_STARTALL, all partitions associated with that operation are inactive. A call to MPI_PREADY marks the indicated partition as active. Calling MPI_PREADY on an active partition is erroneous.

MPI_PREADY_RANGE(partition_low, partition_high, request)
IN partition_lowlowest partition ready for transfer (non-negative integer)
IN partition_highhighest partition ready for transfer (non-negative integer)
INOUT requestpartitioned communication request (handle)
C binding
int MPI_Pready_range(int partition_low, int partition_high, MPI_Request request)
Fortran 2008 binding
MPI_Pready_range(partition_low, partition_high, request, ierror)

INTEGER, INTENT(IN) :: partition_low, partition_high
TYPE(MPI_Request), INTENT(IN) :: request
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
Fortran binding
MPI_PREADY_RANGE(PARTITION_LOW, PARTITION_HIGH, REQUEST, IERROR)

INTEGER PARTITION_LOW, PARTITION_HIGH, REQUEST, IERROR

A call to MPI_PREADY_RANGE has the same effect as calls to MPI_PREADY, executed for i=partition_low, ..., partition_high, in some arbitrary order. Calls to MPI_PREADY_RANGE follow the same rules as those for MPI_PREADY calls.

MPI_PREADY_LIST(length, array_of_partitions, request)
IN lengthlist length (integer)
IN array_of_partitionsarray of partitions (array of non-negative integers)
INOUT requestpartitioned communication request (handle)
C binding
int MPI_Pready_list(int length, const int array_of_partitions[], MPI_Request request)
Fortran 2008 binding
MPI_Pready_list(length, array_of_partitions, request, ierror)

INTEGER, INTENT(IN) :: length, array_of_partitions(length)
TYPE(MPI_Request), INTENT(IN) :: request
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
Fortran binding
MPI_PREADY_LIST(LENGTH, ARRAY_OF_PARTITIONS, REQUEST, IERROR)

INTEGER LENGTH, ARRAY_OF_PARTITIONS(*), REQUEST, IERROR

A call to MPI_PREADY_LIST has the same effect as calls to MPI_PREADY, executed for the partitions specified in the range array_of_partitions[0] ,..., array_of_partitions[count-1] of the array_of_partitions, executed in some arbitrary order. Calls to MPI_PREADY_LIST follow the same rules as those for MPI_PREADY calls.


PreviousUpNext
Up: Semantics of Partitioned Point-to-Point Communication Next: Communication Completion under Partitioning Previous: Semantics of Partitioned Point-to-Point Communication


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