Hi!
I have the following situation.
I have a master that spawns a number of processes. Later on I signal the
group of processes to spawn one process. I merge the two groups in one
Intra-communicator. Later on I want to spawn another one process using all
the merged process and then merge them together. Why do I need that?
I want to use one Intra-communicator for communication regardless whether
they where created at the same time or later on.
So what is the Question then????????
I want to have a global Intra-communicator. That should be initialized in
the beginning to MPI_COMM_WORLD.
After spawning a new process and merging it to the parent group, I want to
assign the new intra-communicator to that global communicator.
I have tried the following but it seems it is not working, please correct me
and advise.
Best Regards
Sherif
/* initialization */
MPI_Comm_dup(MPI_COMM_WORLD,&MainComm);
/* Creating new process */
MPI_Comm_spawn(worker_sim1,MPI_ARGV_NULL,1 ,
MPI_INFO_NULL, 0, MainComm, &Comm_1,
ierr);
/* Merge */
MPI_Intercomm_merge(Comm_1,0, &Comm_2);
/* Reassign */
MPI_Comm_dup(Comm_2,&MainComm);
_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
|