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 07:49:21


On Jul 17, 2010, at 4:13 AM, Anton Shterenlikht wrote:

> Sorry, just to be absolutely clear, are you saying
> that even though only one process in the communicator
> is calling Bcast, the call will be made on all
> processes?

MPI does not magically cause all processes to call MPI_Bcast behind the scenes for you. You must ensure that every process in the communicator explicitly invokes MPI_Bcast. You can do whatever logic you want (to include "if" blocks, etc.) as long as they all call MPI_Bcast.

To be clear: all MPI collective operations must be explicitly invoked by every process in the target communicator.

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