Running an MPI Program

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 mpirunexec command. The command line syntax is as follows:


         $ mpirun
         > mpiexec -n <# of processes> -ppn <# of processes per node> -f <hostfile> ./myprog.exe
      

For example:


         $ mpirun
         > mpiexec -n 4 -ppn 2 -f hosts ./myprog.exe
      

The mpiexec command launches the Hydra process manager, which controls the execution of your MPI program on the cluster.

In the command line above:

The mpirun command is a wrapper around the mpiexec.hydra command, which invokes the Hydra process manager. Consequently, you can use all mpiexec.hydra options with the mpirun command.

For the list of all available options, run mpirunexec with the -help option, or see the Intel® MPI Library Developer Reference, section Command Reference > Hydra Process Manager Command.

Note

The commands mpirun and mpiexec.hydra are interchangeable. However, you are recommended to use the mpirun command for the following reasons:

See Also

Controlling Process Placement

Job Schedulers Support