Currently, there is no mechanism to query a request handle for its "flavor" or "kind". This is asymmetric with communicators and windows:
For communicators there are query routines that allow inferring whether the handle correspond to a {inter,intra}communicator and associated virtual topology if any.
For windows the attribute with key MPI_WIN_CREATE_FLAVOR can be queried for the windows create flavor.
Knowing the flavor or category of a request is useful in object-oriented (e.g. C++) and/or high-level (e.g. Python) languages to wrap a raw C MPI handle value to some higher level type or class encapsulating the handle. The class may be specific to the kind of request. Examples: The removed C++ bindings had Request and Prequest classes. mpi4py borrowed the C++ convention to expose Request and Prequest classes. Java MPI bindings also have Request and Prequest classes.
Proposal
Add a mechanism to query Request handles for its flavor or kind, mainly consisting of
a new routine to perform the query,
companion enum/state values to identify the Request flavor.
Changes to the Text
TBD
Impact on Implementations
Implementations must implement a new MPI routine and add new enum/state values to mpi.h.
The request flavor is most likely already available to implementations as an internal property of the concrete request object.
Impact on Users
There are no backward compatibility implications for MPI API or existing MPI ABIs.
Problem
Requests are created with different "flavors" or "kinds"
Some of the Request-related routines deal with only a specific flavors of requests, for example:
Currently, there is no mechanism to query a request handle for its "flavor" or "kind". This is asymmetric with communicators and windows:
Knowing the flavor or category of a request is useful in object-oriented (e.g. C++) and/or high-level (e.g. Python) languages to wrap a raw C MPI handle value to some higher level type or class encapsulating the handle. The class may be specific to the kind of request. Examples: The removed C++ bindings had
Request
andPrequest
classes. mpi4py borrowed the C++ convention to exposeRequest
andPrequest
classes. Java MPI bindings also haveRequest
andPrequest
classes.Proposal
Add a mechanism to query Request handles for its flavor or kind, mainly consisting of
Changes to the Text
TBD
Impact on Implementations
Implementations must implement a new MPI routine and add new enum/state values to
mpi.h
. The request flavor is most likely already available to implementations as an internal property of the concrete request object.Impact on Users
There are no backward compatibility implications for MPI API or existing MPI ABIs.
References and Pull Requests
TBD