I would like to understand why should I use MPI_Wait to wait for an MPI request to complete?
So, in the end of MPI_Send scope I would use the MPI_Wait method, but why? In my comprehension MPI_Send just send a message and doesn't wait a request to complete, but the MPI_ISend do!
Thanks.
To summarize what @Hristo Iliev said, you shouldn't (and can't) call MPI_WAIT for a call to MPI_SEND. Calling MPI_WAIT requires that you pass in an MPI_Request object which you get as a return value from an MPI_I<something> function. Without that object, MPI doesn't know what you're trying to wait on.
So your reasoning in the end is correct. You don't wait on an MPI_SEND, but you do (and must) wait on an MPI_ISEND.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With