Intel® MPI Library Developer Guide for Linux* OS

ID 768728
Date 7/13/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

MPMD Launch Mode

Intel® MPI Library supports the multiple programs, multiple data (MPMD) launch mode. There are two ways to do this.

The easiest way is to create a configuration file and pass it to the -configfile option. A configuration file should contain a set of arguments for mpirun, one group per line. For example:

$ cat mpmd_config
-n 1 -host node1 ./io <io_args>
-n 4 -host node2 ./compute <compute_args_1> 
-n 4 -host node3 ./compute <compute_args_2
$ mpirun -configfile mpmd_config

Alternatively, you can pass a set of options to the command line by separating each group with a colon:

$ mpirun -n 1 -host node1 ./io <io_args> :\
-n 4 -host node2 ./compute <compute_args_1> :\
-n 4 -host node3 ./compute <compute_args_2>

The examples above are equivalent. The io program is launched as one process on node1, and the compute program is launched on node2 and node3 as four processes on each.

When an MPI job is launched, the working directory is set to the working directory of the machine where the job is launched. To change this, use the -wdir <path>.

Use -env <var> <value> to set an environment variable for only one argument set. Using -genv instead applies the environment variable to all argument sets. By default, all environment variables are propagated from the environment during the launch.