Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why to use MPI_Wait in MPI_Send?

Tags:

mpi

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.

like image 492
user2069668 Avatar asked Dec 07 '25 09:12

user2069668


1 Answers

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.

like image 104
Wesley Bland Avatar answered Dec 14 '25 00:12

Wesley Bland



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!