Open MPI logo

Open MPI User's Mailing List Archives

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

From: Bert Wesarg (wesarg_at_[hidden])
Date: 2006-07-18 05:13:43


Hi,

s anwar wrote:
> Please see attached source file.
>
> According to my understanding of MPI_Comm_spawn(), the intercommunicator
> returned is the same as it is returned by MPI_Comm_get_parent() in the
> spawned processes. I am assuming that there is one intercommunicator
> which contains all the (spawned) child processes as well as the parent
> process. If this is the case, then why does an MPI_Bcast() using such an
> intercommunicator wait indefinately?

your code from line 75:

        MPI_Bcast(&one_int, 1, MPI_INT, 0, intercomm);

from the mpi 2 standard "7.3.2.1. Broadcast"

"If comm is an intercommunicator, then the call involves all processes in
the intercommunicator, but with one group (group A) defining the root
process. All processes in the other group (group B) pass the same value in
argument root, which is the rank of the root in group A. The root passes
the value MPI_ROOT in root. All other processes in group A pass the value
MPI_PROC_NULL in root. Data is broadcast from the root to all processes in
group B. The receive buffer arguments of the processes in group B must be
consistent with the send buffer argument of the root."

so, you define no group to be the root group (group A). i don't know what
schould happen, when no root group is defined, but your code firstly don't
conform to the standard, so don't blame the implementation first.

by
bert wesarg