[MPICH] Changing the comm size at runtime

Patrick Gräbel pgraebel at stud.fh-dortmund.de
Wed Mar 14 13:04:26 CDT 2007


Thanks for your reply!

If I got your suggestion right: The master starts the slaves via
MPI_Comm_spawn. I have to pass a filename including a path to this function.

Is there a way to let the slaves dynamically add/remove themselves
to/from the master (so that the master does not need to know the slave
executables)?

I wonder if MPI is capable of doing such dynamic things. I have read
that PVM 3 has such features but MPI hasn't because it works with static
groups. Is that correct?

Thanks
Patrick

Rajeev Thakur wrote:
> You should be able to use the MPI_Comm_spawn functionality for this. You can
> run a single parent process as the master, which spawns some number of
> slaves using MPI_Comm_spawn. When the slaves are done, they (and the master)
> call MPI_Comm_disconnect. Then the slaves can call MPI_Finalize and exit.
> The master can then spawn a new number of slaves and repeat. 
> 
> Rajeev
> 




More information about the mpich-discuss mailing list