It's likely a lot more efficient to MPI_COMM_SPAWN *all* of your children at once, and then subdivide up the resulting newcomm communicator as desired.
It is *possible* to have a series MPI_COMM_SPAWN calls that spawn a single child process, and then later join all of those children into a single communicator, but it is somewhat tricky and likely not worth it (i.e., you'll save a lot of code complexity if you can spawn all the children at once). > On Mar 23, 2017, at 12:23 AM, gzzh...@buaa.edu.cn wrote: > > Hi team: > I have a question about MPI dynamic process manage, I hope you can > provide some help. > First of all, the MPI program running on multiple nodes, the group with > MPI_COMM_WORLD > was splitted into some subgroups by nodes and sub-communicators were created > respectively > so that MPI processes in one node can communicate with each other through > these sub-communicators. > Then using MPI_Comm_spawn("./child", NULL, 1, hostinfo, 0, sub-communicator, > &newcomm, &errs) > to spawn one child process in each node . Children processes were expected to > form a group > and further to create an intra-communicator so that using it some message > passing can be done between these children processes. > The question is how can I achieve that? Or only have to use MPI_Comm_accept > &MPI_Comm_connect to establish > a connection? > > best regards! > > ------------------------------------- > Eric > > _______________________________________________ > users mailing list > users@lists.open-mpi.org > https://rfd.newmexicoconsortium.org/mailman/listinfo/users -- Jeff Squyres jsquy...@cisco.com _______________________________________________ users mailing list users@lists.open-mpi.org https://rfd.newmexicoconsortium.org/mailman/listinfo/users