Before running an MPI program, place it to a shared location and make sure it is accessible from all cluster nodes. Alternatively, you can have a local copy of your program on all the nodes. In this case, make sure the paths to the program match.
Run the MPI program using the
command. The command line syntax is as follows:
$ mpirun -n <# of processes> -ppn <# of processes per node> -f <hostfile> ./myprog
$ mpirun -n 4 -ppn 2 -f hosts ./myprog
In the command line above:
sets the number of MPI processes to launch; if the option is not specified, the process manager pulls the host list from a job scheduler, or uses the number of cores on the machine.
sets the number of processes to launch on each node; if the option is not specified, processes are assigned to the physical cores on the first node; if the number of cores is exceeded, the next node is used.
specifies the path to the host file listing the cluster nodes; alternatively, you can use the
option to specify a comma-separated list of nodes; if hosts are not specified, the local node is used.
is the name of your MPI program.
command is a wrapper around the
command, which invokes the Hydra process manager. Consequently, you can use all
options with the
For the list of all available options, run
option, or see the
Intel® MPI Library Developer Reference
Command Reference > Hydra Process Manager Command
are interchangeable. However, you are recommended to use the
command for the following reasons:
You can specify all
options with the
command detects if the MPI job is submitted from within a session allocated using a job scheduler like PBS Pro* or LSF*. Thus, you are recommended to use
when an MPI program is running under a batch scheduler or job manager.