[MPICH2-dev] help

Rusty Lusk lusk at mcs.anl.gov
Thu Apr 24 11:21:02 CDT 2003


To make this admittedly cryptic help message more clear, here is an
example:

  mpiexec -configfile myconfig

where myconfig contains

  -n 1 node1 cpi
  -n 1 node2 cpi
  -n 1 node3 cpi
  -n 1 node4 cpi
  -n 1 node5 cpi

is one way to run cpi on five explicit nodes.  Another way is to put
up the mpd's on the nodes you want (see mpdboot). and then do

  mpiexec -n 5 cpi

The mpd's can then be reused, which is the point.

Rusty


| I'm not an expert on MPD or mpiexec, but since our expert is out of town
| I'll try to answer this.  mpiexec -help reports the following:
| 
| mpiexec [ -h   or  -help   or  --help ]
| mpiexec -file filename  # where filename contains pre-built xml for mpdrun
| mpiexec -configfile filename  # where filename contains cmd-line arg-sets
| mpiexec -default defaultArgs -n <n> -host <h> -wdir <w> -path <p> cmd args :
| more_arg_sets : ...
|     other default arguments can be -l (line labels on stdout, stderr) and
|     -setenvall (pass entire environment of mpiexec to all processes),
|     -env KEY1=VALUE1 -env KEY2=VALUE2 ...
|     defaultArgs are passed to all processes unless overridden
| sample execution:
|     mpiexec.py  -default -n 2 -wdir /bin -env RMB3=e3 : pwd : -wdir /tmp pwd
| : printenv
| 
| So, to run the program on four explicitly specified hosts that are already
| part of the MPD ring, you would need to do the following:
| 
| mpiexec -np 1 -host host1 cpi : -np 1 -host host2 cpi : \
|         -np 1 -host host3 cpi : -np 1 -host host4 cpi
| 
| It would also seem that following is equivalent to the above:
| 
| mpiexec -default -np 1 : -host host1 cpi : -host host2 cpi : \
|         -host host3 cpi : -host host4 cpi
| 
| However, the even shorter command below does not work and should not be
| attempted with MPICH2 0.93 because it results in mpiexec producing an
| endless loop of error messages (a bug that has already been reported to our
| MPD developers):
| 
| mpiexec -default -np 1 cpi : -host host1 : -host host2 : \
|         -host host3 : -host host4
| 
| I hope this helps.
| 
| --brian
| 
| 
| > -----Original Message-----
| > From: owner-mpich2-dev at mcs.anl.gov
| > [mailto:owner-mpich2-dev at mcs.anl.gov]On Behalf Of chenyu
| > Sent: Wednesday, April 23, 2003 22:01
| > To: mpich2-dev at mcs.anl.gov
| > Subject: [MPICH2-dev] help
| >
| >
| > hi:
| >   in mpich-1.2.x, we can use "mpirun -np 4 -machinefile filename
| > cpi" to run mpi progs in different nodes. the only change is
| > filename's content.
| >   but how can i do the same thing in mpich2. we can not use
| > commands "mpiexec -np 4 -machinefile filename cpi"
| >   Who can help me?
| >
| >
| >         chenyu
| >         chenyu-tmlinux at hpclab.cs.tsinghua.edu.cn
| >           2003-04-24
| >
| >
| 




More information about the mpich2-dev mailing list