mpirun for mpd


Up: Tools Next: Usage Previous: Tools

mpirun is the tool that communicates with the mpd process launcher to start MPI applications. mpirun comes in two flavors - mpirun and guimpirun. mpirun is the command line version of the tool and guimpirun is the graphical version. The command line tool was developed first and then the gui tool was ported from the command line version. For this reason, the command line tool is more stable.

You will want to add MPICH mpd bin to your path to have access to mpirun and the other tools from a command prompt.



Up: Tools Next: Usage Previous: Tools


Usage


Up: mpirun for mpd Next: Configuration files for mpirun Previous: mpirun for mpd


mpirun [-mpirun options] configfile [args ...]  
mpirun -np #processes [-mpirun options] executable [args ...]  
Bracketed sections are optional (don't type the [] characters).



Up: mpirun for mpd Next: Configuration files for mpirun Previous: mpirun for mpd


Configuration files for mpirun


Up: mpirun for mpd Next: Command line options for mpirun Previous: Usage

The configuration file format is as follows:

Bracketed lines are optional (don't inlucde the [] characters). The # character will comment out a line. You may specify a path to an executable on each host line, thus enabling MPMD programming. If you do not specify a path, then the default is used from the exe line.

Here are two sample configuration files:

This one shows a more complicated scenario:

This configuration file would launch one instance of master.exe on fry and three instances of slave.exe, one on fry and two on jazz. Host light would be ignored because of the # character. Each process would have four environment variables set. Each process would receive ``-i c: temp cool.points'' as command line arguments.



Up: mpirun for mpd Next: Command line options for mpirun Previous: Usage


Command line options for mpirun


Up: mpirun for mpd Next: MPIRegister tool Previous: Configuration files for mpirun

-np #procs

Launch #procs processes. mpirun uses the list of hosts stored in the registry by the configuration tool to choose hosts to start processes on. If there is no list in the registry all the processes are launched on the local host.

-machinefile filename

This tells mpirun to use the hosts in filename when determining where to launch processes. Use this in conjunction with -np x to launch processes on a specific set of machines. Put one host per line in the file. Empty lines are discarded and lines starting with # are ignored. You can specify a number after the host name to recommend how many processes to launch on the host. This is useful if you want to launch more than one process on a multi-CPU machine. mpirun will cycle through this list until all the processes are launched, repeating hosts if necessary. Example file:
ccnode01 
ccnode02 2 
ccnode03 4 
ccnode04 
-localonly

This flag causes all the processes to be launched on the local machine using the shared memory device.

-localroot

This flag causes the root process to be launched by mpirun instead of mpd. This only happens if the root process is on the same node where mpirun is executed. The reason for this option is to allow the root to live in the same space as mpirun. It has two advantages. First, the root can create windows that the user can see and interact with. Second, if the root crashes, you can attach the debugger to see what happened.

-env "var1=val1|var2=val2|var3=val3|...varn=valn"

This will set the environment variables specified in the string before each process is launched. Remember to quote the string so the command prompt doesn't interpret the vertical bar as a pipe command.

-logon

This option will cause mpirun to prompt for an account and password. If you use mpiregister.exe to encrypt an account and password into the registry, -logon will override the use of that user.

{ -map drive:$$$$host$$share}

This option will map a drive on the hosts where the processes are launched. The mappings are removed after the processes exit. This option can be repeated multiple times. example: -map z: myserver myhome

{ -dir drive:$$some$$path}

This sets the working directory for the launched processes. If this option is not specified the current directory is used.

-hosts n host1 host2 ... hostn
-hosts n host1 m1 host2 m2 ... hostn mn

Specify the hosts to launch on. In the second form, the number of processes is m1 + m2 + ... + mn.

-pwdfile filename

Specify a file containing an account and password used to launch processes under. The first line of the file must be the account name and the second line must be the password.

-exitcodes

This option causes mpirun to print out the exit code of each process as it exits.

-noprompt

This option prevents mpirun from prompting for user credentials if they have not been stored in the registry.

-priority class:level

This option set the process run priority. The class can be a value from 0 to 4 representing idle, below, normal, above, and high priority classes (realtime priority is not allowed). The level can be a value from 0 to 5 representing idle, lowest, below, normal, above, and higest. The values corresponding to below and above are only supported on Window2000 and XP. An example would be -priority 3:4. The default is 2:3.

-mpduser

Use this option to launch a job in the context of the user registered with mpd. All the mpd's must have been installed with the mpduser option, an account must be set on each mpd, and the mpduser option must be enabled on each mpd. If the mpd's are configured correctly, mpirun will not use the current user's credentials to launch the job but instead launch in the context of the registered mpd user.




Up: mpirun for mpd Next: MPIRegister tool Previous: Configuration files for mpirun