On Aug 24, 2009, at 4:23 PM, Eugene Loh wrote:
> Meanwhile, the last process, P2, is waiting on a receive before it
> enters the barrier.
>
Right-o -- I missed that key point. So yes, P0's send will definitely
match that first recv (before the barrier). If the barrier was not
there and the P0 send was a different length from the P1 send, and
P2's receives assume that they come in that order, Bad Things could
happen if the barrier was removed.
The statement I made that started this whole thread was probably
something along the lines of "Any MPI application that relies on
MPI_BARRIER for correctness is erroneous." I'll now revise that
statement; how about "Any MPI application that relies on MPI_BARRIER
for correctness is a bad idea."
:-)
--
Jeff Squyres
jsquyres_at_[hidden]
|