[MPICH] Changing the comm size at runtime

Rajeev Thakur thakur at mcs.anl.gov
Wed Mar 14 13:28:31 CDT 2007


You can try MPI_Comm_connect and MPI_Comm_accept. Independently started
processes can connect with these functions and then communicate.

Rajeev 

> -----Original Message-----
> From: Patrick Gräbel [mailto:pgraebel at stud.fh-dortmund.de] 
> Sent: Wednesday, March 14, 2007 1:04 PM
> To: Rajeev Thakur
> Cc: mpich-discuss at mcs.anl.gov
> Subject: Re: [MPICH] Changing the comm size at runtime
> 
> 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