Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] MPI_Bsend vs. MPI_Ibsend (2)
From: Eugene Loh (eugene.loh_at_[hidden])
Date: 2010-05-06 16:22:30


First, to minimize ambiguity, it may make sense to distinguish
explicitly between two buffers: the send buffer (specified in the
MPI_Send or MPI_Bsend call) and the attached buffer (specified in some
MPI_Buffer_attach call).

Jovana Knezevic wrote:

>On the other hand, a slight confusion when Buffered send is concerned remains:
>In my understanding, MPI_SEND (standard, blocking) does not return
>until the send operation it invoked has completed. Completion can mean
>the message was copied into an MPI internal buffer, or it can mean the
>sending and receiving processes synchronized on the message.
>
MPI_Send will return when it is safe to reuse the send buffer. No
guarantees about anything having to do with the receiver.

>So, if we
>decide to use buffered send (Bsend, so blocking), and we say "I want
>to allocate a large enough buffer, I want my data to be copied into
>the buffer then, because I do not want anyone else to decide if I am
>going to syncronize completely my sends and receives on the message -
>I know what I'm doing :-)!" then as soon as the data is copied to the
>buffer, the call returns and the buffer can be reused.
>
>
MPI_Bsend will return when it is safe to reuse the send buffer. The
message data might simply have been copied to the local attached buffer.

>Is the difference in comparison to Ibsend that with Ibsend the data
>doesn't even have to be copied to the buffer when the call returns,
>
right.

>or
>something like that? Because otherwise, I still do not see the
>difference: data copied into buffer-> call returns! Why wouldn't I
>reuse my message-buffer then?!
>