To execute a MPI/C program, the most generic way is to use the provided mpirun script. Roughly this script determines machine architecture, which include other machines and launch the desired processes on the other machines. The following command launch the executable program on 2 nodes.
mpirun -np 2 executable
–np 2 specifies the number of nodes (not processors, eg say there are 8 processors per node ) to use for your binary’s execution. Therefore, -np 2 means 16 processors will be used.
Choice of nodes can be specified by setting a machinefile eg:
mpirun -machinefile machine-file-name -np number-of-nodes executable