Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] do all processors have to execute MPI_Bcast?
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2010-07-17 11:58:33


On Jul 17, 2010, at 8:13 AM, David Zhang wrote:

> collective calls return once it receive reply from everyone in the communicator that the message has been received (this is done under the hood). Thus since only one process in the communicator calls Bcast, that process will hang indefinitely waiting for reply from other processes on the same communicator.

This is not technically correct. For example, MPI_BCAST of the root *could* return "immediately", even before other processes have called MPI_BCAST. But it doesn't have to.

MPI only defines that collective operations must be invoked by all processes in the communicator. The only collective operation with defined blocking / synchronization semantics is MPI_BARRIER. It provides the guarantee that no process will exit the barrier until all processes have entered the barrier

All other collective operations are just defined such that all processes in the communicator must invoke that collective -- no synchronization is guaranteed. Synchronization *may* occur, but that's an implementation-specific issue (e.g., Open MPI may only synchronize processes in an MPI_BCAST if the message is "large").

-- 
Jeff Squyres
jsquyres_at_[hidden]
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/