views:

124

answers:

1

Hello All,

If i declare a table of MPI_Request ( one request for each CPU ), it will be accessible globally when using for MPI_Isend/MPI_Irecv ?? ( In comparison with MPI_comm that is everywhere accessible after initializing the MPI environment )

Thanks.

+2  A: 

I find the question a bit confusing, perhaps you could clarify. MPI_Request is a type; if you declare a table of values of this type on one process then it is only available to that process, in line with any other variables declared.

Data of type MPI_REQUEST is usually used as handles for immediate sends and receives (ISend, Irecv), to allow the sending and receiving processes to test that the message has been received, using MPI_Test or MPI_Wait/MPI_Waitall/MPI_Waitany.

MPI_Comm is also a type, but perhaps you mean the default communicator itself which is of this type ? This is known to all the processes because MPI_Init which (effectively) creates the default communicator is a collective operation.

High Performance Mark
Thank you for your answer, i ask this question because MPI_Isend and MPI_Irecv take an MPI_Request type as an argument. Assuming that every CPU is in its world and MPI_Request type is not shared, how they can know that a request matches a specific MPI_Isend and MPI_Irecv ?
Matching is done by the values of the `source` and `tag` parameters, just as with blocking send/receive. If process `i` posts a send with destination `j` and tag `n`, then process `j` will receive it IFF it posts a receive with source `i` and tag `n` (or `MPI_ANY_TAG`). The MPI implementation is responsible for updating the status of the `MPI_Request` objects at both processes once the message has been delivered.
suszterpatt