Thank you Jeff for the clarification.
On Fri, Feb 14, 2014 at 7:06 AM, Jeff Squyres (jsquyres) <jsquyres_at_[hidden]
> On Feb 13, 2014, at 10:59 PM, Saliya Ekanayake <esaliya_at_[hidden]> wrote:
> > Anyway, to answer your question I was trying to do sendrecv in a chain
> where "toSend" and "receiveFrom" ranks are not the same. I was using a
> single buffer, which resulted in cases where the buffer content got
> replaced with received values before being able to send its original
> content. I think it was an error on my side to use a single buffer in a
> pipeline sendrecev. I fixed it by having two buffers.
> That is correct: MPI_SENDRECV does not guarantee any ordering.
> > I guess still with MPI_IN_PLACE this could happen. Please correct me
> here if I am wrong.
> That is also correct. You could, however, use MPI_SENDRECV_REPLACE. It's
> not much more efficient than providing your own two buffers (i.e., OMPI
> will alloc a temporary receive buffer, and when the send is done, it'll
> copy from the temp to the send buffer).
> Jeff Squyres
> For corporate legal information go to:
> users mailing list
Saliya Ekanayake esaliya_at_[hidden]
Cell 812-391-4914 Home 812-961-6383