Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] Collective operations and synchronization
From: Ralph Castain (rhc_at_[hidden])
Date: 2009-03-23 18:37:09

I think perhaps you folks are all caught up a tad too much in the
standard and not reading the intent of someone's question... :-)

I believe the original question was concerned with ensuring that all
procs had completed MPI_Allreduce before his algorithm attempted other
operations. As you folks know, procs can leave MPI_Allreduce at
significantly different times. Using an MPI_Barrier after
MPI_Allreduce would accomplish the questioner's objective.

Whether or not the questioner's particular program really -needs- to
do that is another matter - one I personally wouldn't attempt to
answer without knowing a lot more about what that next step after
MPI_Allreduce does.

On Mar 23, 2009, at 3:49 PM, Ashley Pittman wrote:

> On 23 Mar 2009, at 21:11, Ralph Castain wrote:
>> Just one point to emphasize - Eugene said it, but many times people
>> don't fully grasp the implication.
>> On an MPI_Allreduce, the algorithm requires that all processes -
>> enter- the call before anyone can exit.
>> It does -not- require that they all exit at the same time.
>> So if you want to synchronize on the -exit-, as your question
>> indicated, then you must add the MPI_Barrier as you describe.
> All MPI_Barrier requires is that all processes enter the call before
> anyone can exit, I'm not sure that "synchronising on exit" has any
> particular meaning at all.
> Putting a MPI_Barrier call immediatly after a MPI_Allreduce call
> would be superfluous.
> Ashley,
> _______________________________________________
> users mailing list
> users_at_[hidden]