Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: Re: [OMPI users] Does sendrecv guarantee order?
From: Jeff Squyres (jsquyres) (jsquyres_at_[hidden])
Date: 2014-02-14 07:06:44

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: