next up previous
Next: Thorough Testing Up: Special Considerations for Running Previous: Using special switches.

Heterogeneous networks and closer control.

Actually, each time it runs, mpirun is constructing and using a new file of machine names just for that run, using the machines file as input. (The new file is called PIyyyy, where yyyy is the process identifier.) If you specify -keep_pg on your mpirun invocation, you can use this information to see where mpirun ran your last few jobs. You can construct this file yourself and specify it as an argument to mpirun. To do this, use
    mpirun -np 5 myprog -p4pg pgfile
where pfile is the name of the file. The file format is defined below. This is necessary when you want closer control over the hosts you will run on, or when mpirun cannot construct it automatically. Such is the case when The format of such a file is a set of lines of the form
   <hostname>  <#procs>  <progname>  [<login>]
So an example of such a file, where the command is being issued from host sun1, might be
    sun1   0  /users/jones/myprog
    sun2   1  /users/jones/myprog
    sun3   1  /users/jones/myprog
    hp1    1  /home/mbj/myprog    mbj
The above file specifies four processes, one each of three suns and one on another workstation where the user's account name is different. Note the 0 in the first line. It is there to indicate that no other processes are to be started on host sun1 than the one started by the user by his command.

You might want to run all the processes on your own machine, just as a test. You can do this just by repeating its name in the file:

    sun1 0 /users/jones/myprog
    sun1 1 /users/jones/myprog
    sun1 1 /users/jones/myprog
Will run three processes on sun1, communicating via sockets.

To run on a shared-memory multiprocessor, with 10 processes, you would use a file like

    sgimp  9  /u/me/prog
Note that this is for 10 processes, 1 of them started by the user directly, and the other 9 specified in this file.

If you are logged into host gyrfalcon and want to start a job with one process on gyrfalcon and three processes on alaska, where the alaska processes communicate through shared memory, you would use

    local    0  /home/jbg/main
    alaska   3  /afs/u/graphics


next up previous
Next: Thorough Testing Up: Special Considerations for Running Previous: Using special switches.
Karen D. Toonen
1998-11-19