In MPI-/, requests were associated with point-to-point operations.
In MPI-// there are
several different types of requests. These range from new MPI-/ calls for
I/O to generalized requests. It is desirable to allow
these calls use the same request mechanism. This allows one to
wait or test on different types of requests. However,
MPI_{TESTWAIT}{ANY
SOME
ALL} returns a status
with information about the request. With the generalization of
requests, one needs to define what information will be returned in the
status object.
In MPI-//, each call fills in
the appropriate fields in the status object.
Any unused fields will
have undefined values. A call to
MPI_{TESTWAIT}{ANY
SOME
ALL} can modify any of
the fields in the status object. Specifically, it can modify fields
that are undefined. The fields with meaningful value for a given
request are defined in the sections with the new request.
Generalized requests raise additional considerations. Here, the user provides the functions to deal with the request. Unlike other MPI-/ calls, the user needs to provide the information to be returned in status. The status argument is provided directly to the callback function where the status needs to be set. Users can directly set the values in 3 of the 5 status values. The count and cancel fields are opaque. To overcome this, new calls are provided:
MPI_STATUS_SET_ELEMENTS(status, datatype, count)
int MPI_Status_set_elements(MPI_Status *status, MPI_Datatype datatype, int count)
MPI_STATUS_SET_ELEMENTS(STATUS, DATATYPE, COUNT, IERROR)INTEGER STATUS(MPI_STATUS_SIZE), DATATYPE, COUNT, IERROR
int MPI::Status::Set_elements(const MPI::Datatype& datatype, int count)
void
This call modifies the opaque part of status so that a call to MPI_GET_ELEMENTS will return count. MPI_GET_COUNT will return a compatible value.
A subsequent call to MPI_GET_COUNT(status, datatype, count) or to MPI_GET_ELEMENTS(status, datatype, count) must use a datatype argument that has the same type signature as the datatype argument that was used in the call to MPI_STATUS_SET_ELEMENTS.
MPI_STATUS_SET_CANCELLED(status, flag)
int MPI_Status_set_cancelled(MPI_Status *status, int flag)
MPI_STATUS_SET_CANCELLED(STATUS, FLAG, IERROR)INTEGER STATUS(MPI_STATUS_SIZE), IERROR
LOGICAL FLAG
int MPI::Status::Set_cancelled(bool flag)
void
If flag is set to true then a subsequent call to MPI_TEST_CANCELLED(status, flag) will also return flag = true, otherwise it will return false.
MPI-Standard for MARMOT