How are requests represented? At the MPI level, they are opaque (pointers in the MPICH implementation). But eventually, the request needs to be defined as a structure containing some data. There is clearly data common to the MPI implementation, but each device may have its own needs for special data.
Should we define a common form? This is pretty much true now, with the possible exception of the ``nonblocking id'', which may be an int (for nx), a small structure (IBM MPL or aioread/aiowrite), or something else. The send_id may be 4 or 8 bytes, depending on the system.
One approach is to provide the basics in the structure (and make them part of the MPIR handle rather than MPID handle) and use a pointer for any other data. This is the most flexible but potentially introduces an additional memory allocation. Again, the single device and multi-device could use slightly different forms, though I don't want to maintain that.
What to do?
Choose common form with 4 int area for any special device needs. Device can put a pointer to more data there if needed.
Rather than have separate device and MPIR parts of the request, there is just a single request type for each operation. That is, there is an MPIR_RHANDLE for receive requests, an MPIR_SHANDLE for send requests, and similar structures for persistent and user operations. An MPI_Request is simply a union of these types.