[MPICH] Specifying machinefile within MPI_Comm_spawn command

Rajeev Thakur thakur at mcs.anl.gov
Thu Feb 16 16:52:08 CST 2006


You need to pass an MPI_Info object with the key "host" and value set to the
hostname. I believe that this is one per process. So if you need to spawn
two processes, you need to call MPI_Comm_spawn_multiple, with count=2,
array_of_commands={worker,worker}, array_of_maxprocs={1,1},
array_of_info={"host""debug7","host""debug8"; ie 2 info objects with the 2
hostnames.

Let us know if that doesn't work.

Rajeev 
 

> -----Original Message-----
> From: owner-mpich-discuss at mcs.anl.gov 
> [mailto:owner-mpich-discuss at mcs.anl.gov] On Behalf Of Rajesh Sudarsan
> Sent: Thursday, February 16, 2006 10:40 AM
> To: mpich-discuss at mcs.anl.gov
> Subject: [MPICH] Specifying machinefile within MPI_Comm_spawn command
> 
> Hi,
> I am trying out a simple example using MPI_Comm_spawn command 
> in mpich2. 
> The command works fine and it spawns new processes without any
> error. But I am not able to specify on which processor node 
> to spawn the 
> process. The only argument where I thought I could enter the node
> information was MPI_Info argument in the MPI_Comm_spawn command. But 
> still the spawn command starts the new processes on arbitrary nodes.
> 
> I know that in the case of LAM/MPI, the node specification for spawn 
> process is given as a "appshcema" file using MPI_Info 
> argument. But the
> same technique does not seem to work in mpich2.
> 
> I read the earlier posts in Jan 2006 on this similar issue, but the 
> solution posted suggested to use some flags with the mpiexec 
> command.  
> The code that I am using,  spawns new processes in every iteration. I 
> believe setting the flags will be effective only the first 
> time when the 
> process is spawned.
> 
> Has any one else faced a similar problem?
> 
> My current schema file for the spawn command looks like this.
> 
> debug7 -np 1 -wd /nfs/storage1/users/sudarsar/  worker
> debug8 -np 1  -wd /nfs/storage1/users/sudarsar/  worker
> 
> debug7 and debug8 are the nodes where I want to spawn new processes 
> using the spawn command.  "np" specifies the number of processes to be
> spawned on each node. "wd" specifies the working directory. 
> And the last 
> argument gives the executable name.
> 
> I would really appreciate any kind of help.
> 
> Regards,
> Rajesh
> 
> <http://groups.google.com/group/comp.parallel.mpi/browse_threa
> d/thread/3a3d738528ee2147?hl=en#> 
> 
> 




More information about the mpich-discuss mailing list