I don't think I blamed the implementation in any way in my original email. My intent is to gain understanding of why my code does/should not work. I assumed that I was not passing the correct intercommunicator. However, I am at a loss on how to construct a proper intercommunicator in this case. You have mentioned that I haven't defined any group to be the root group. Could you care to elaborate on how can I make a group a root group?
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 "18.104.22.168. 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.
users mailing list