mpirun - Run mpi programs


mpirun - Run mpi programs


mpirun is a shell script that attempts to hide the differences in starting jobs for various devices from the user. Mpirun attempts to determine what kind of machine it is running on and start the required number of jobs on that machine. On workstation clusters, if you are not using Chameleon, you must supply a file that lists the different machines that mpirun can use to run remote jobs or specify this file every time you run mpirun with the -machine file option. The default file is in util/machines/machines.<arch>.

mpirun typically works like thismpirun


The options for mpirun must come before the program you want to run and must be spelled out completely (no abreviations). Unrecognized options will be silently ignored.

mpirun [mpirun_options...] <progname> [options...] -arch <architecture> - specify the architecture (must have matching machines.<arch> file in ${MPIR_HOME}/util/machines) if using the execer-h

- This help-machine <machine name> - use startup procedure for <machine name>-machinefile <machine-file name> - Take the list of possible machines to run on from the file <machine-file name>-np <np> - specify the number of processors to run on-nolocal - do not run on the local machine (only works for p4 and ch_p4 jobs)-stdin filename - Use filename as the standard input for the program. This is needed for programs that must be run as batch jobs, such as some IBM SP systems and Intel Paragons using NQS (see -paragontype below).-t

- Testing - do not actually run, just print what would be executed


- Verbose - throw in some comments


- Start the first process under dbx where possible


- Start the first process under gdb where possible (on the Meiko, selecting either -dbx or -gdb starts prun under totalview instead)


- Start the first process under xxgdb where possible (-xdbx does not work)


- Start under totalview

Special Options For Nec - Cenju-3


- Excecute program as a batch job (using cjbr)-stdout filename - Use filename as the standard output for the program.-stderr filename - Use filename as the standard error for the program.

Special Options For Nexus Device

-nexuspg filename - Use the given Nexus startup file instead of creating one. Overrides -np and -nolocal, selects -leave_pg.-nexusdb filename - Use the given Nexus resource database.

Special Options For Workstation Clusters


- Use execer to start the program on workstation clusters


- Use a procgroup file to start the p4 programs, not execer (default)-leave_pg - Do not delete the P4 procgroup file after running-p4pg filename - Use the given p4 procgroup file instead of creating one. Overrides -np and -nolocal, selects -leave_pg.-tcppg filename - Use the given tcp procgroup file instead of creating one. Overrides -np and -nolocal, selects -leave_pg.-p4ssport num - Use the p4 secure server with port number num to start the programs. If num is 0, use the value of the environment variable MPI_P4SSPORT. Using the server can speed up process startup. If MPI_USEP4SSPORT as well as MPI_P4SSPORT are set, then that has the effect of giving mpirun the -p4ssport 0 parameters.

Special Options For Batch Environments

-mvhome - Move the executable to the home directory. This is needed when all file systems are not cross-mounted. Currently only used by anlspx-mvback files - Move the indicated files back to the current directory. Needed only when using -mvhome; has no effect otherwise.-maxtime min - Maximum job run time in minutes. Currently used only by anlspx. Default value is 15 minutes-nopoll - Do not use a polling-mode communication. Available only on IBM SPx.-mem value - This is the per node memory request (in Mbytes). Needed for some CM-5s.-cpu time - This is the the hard cpu limit used for some CM-5s in minutes.

Special Options For Ibm Sp2

-cac name - CAC for ANL scheduler. Currently used only by anlspx. If not provided will choose some valid CAC.

Special Options For Intel Paragon

-paragontype name - Selects one of default, mkpart, NQS, depending on how you want to submit jobs to a Paragon.-paragonname name - Remote shells to name to run the job (using the -sz method) on a Paragon.-paragonpn name - Name of partition to run on in a Paragon (using the -pn name command-line argument)

Return Value

On exit, mpirun returns a status of zero unless mpirun detected a problem, in which case it returns a non-zero status (currently, all are one, but this may change in the future).

Specifying Heterogeneous Systems

Multiple architectures may be handled by giving multiple -arch and -np arguments. For example, to run a program on 2 sun4s and 3 rs6000s, with the local machine being a sun4, usempirunbefore specifying the number of processors. Also, the first not specified, then the first -arch must refer to the processor from which

(You must have machines.<arch> files for each arch that you use in the util/machines directory.)

Another approach that may be used the the ch_p4 device is to create a procgroup file directly. See the MPICH Users Guide for more information.



Referenced By

appschema(5), bhost(5), lam(7), lam-helpfile(5), lam_rfrmfd(2), lamboot(1), lamexec(1), laminfo(1), lamssi(7), lamssi_boot(7), lamssi_coll(7), lamssi_cr(7), lamssi_rpi(7), lamtrace(1), libmpi(7), loadgo(1), mpi(7), mpi_comm_spawn(3), mpi_comm_spawn_multiple(3), mpimsg(1), mpitask(1)

Copied to clipboard
free 100$ digital ocean credit