LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Ralf Wildenhues (Ralf.Wildenhues_at_[hidden])
Date: 2004-11-10 02:06:51


* atarpley wrote on Tue, Nov 09, 2004 at 11:05:34PM CET:
> I think I understand this, I would just like some confirmation. :-)
>
> MPI_Send is a blocking, synchronous routine. Meaning it won't return until
> the send buffer is good to use

This is true.

> AND the recipient has started to receive the
> message.

This is not true for MPI_Send (but have a look at MPI_Bsend).

> Question: Does this mean it wont return until the recipient STARTS
> to receive or until the recipient FULLY receives the msg?

MPI_Send completion can have local or non-local semantics. So when it
returns, all you know is you can reuse the buffer, you don't know how
far the communication has proceeded.

> MPI_Isend is a non-blocking, asynchronous routine. Meaning it returns
> immediatly, regardless of the status of the matching receive

This is true.

> or the buffer.

What do you mean with the buffer? After MPI_Isend, you cannot touch the
send buffer yet.

> In order to delete the send buffer okay, MPI_Wait (or MPI_Test) must say that
> it is okay to do so.

This is true.

> Question: The requirement that a test or wait routine be
> used to determine the status of the send buffer effectively turns this into a
> blocking, asynchronous routine, correct?

Possibly. But MPI_Wait/Test after an Isend only tells you that you can
reuse (or free) the send buffer now. Similar to MPI_Send, it does not
guarantee progress of communication.

> If I want to deallocate the buffer
> after each send?

Nothing prevents you from doing this (after Wait or successful Test),
but: Why would you want to do that?

Regards,
Ralf