Mark
2011-03-31 20:30:55 UTC
Hello,
Is there any way to broadcast data from one process to all other
processes without knowing a priori who the root of the broadcast will
be? From what I've read, that doesn't seem possible with MPI_Bcast
since all processes must specify the "root" when they call MPI_Bcast,
but if they don't know a priori who the "root" process is then there
is no way for every MPI_Bcast to specify the root. Unless I'm missing
something obvious, which is always a probable possibility...
To give an example, what I'm trying to do is essentially this: Each
process has a collection of integers. One (and only one, by design)
process has in its collection an integer equal to 0. The process that
possesses the integer 0 must then broadcast an array of data to all of
the other processes. However, the process that contains the integer 0
can change during the course of the run. What is the best way to
achieve this in MPI?
Thanks for your help,
Mark
Is there any way to broadcast data from one process to all other
processes without knowing a priori who the root of the broadcast will
be? From what I've read, that doesn't seem possible with MPI_Bcast
since all processes must specify the "root" when they call MPI_Bcast,
but if they don't know a priori who the "root" process is then there
is no way for every MPI_Bcast to specify the root. Unless I'm missing
something obvious, which is always a probable possibility...
To give an example, what I'm trying to do is essentially this: Each
process has a collection of integers. One (and only one, by design)
process has in its collection an integer equal to 0. The process that
possesses the integer 0 must then broadcast an array of data to all of
the other processes. However, the process that contains the integer 0
can change during the course of the run. What is the best way to
achieve this in MPI?
Thanks for your help,
Mark