Running MPI program on hydra
Run program directly with mpirun
Syntax
mpirun --display-map -H <host1,host2,…> -np <# processes> /path/to/myprogram arg1 arg2
Options:
--display-map: Display the process map just before launch.
-H : specifies nodes for your program to run on.
<host1,host2,…> is replaced by compute node names.
Use n0,n1,n2,…n15 to indicate the compute nodes.
-np: run n copies of the program on the given nodes. The given nodes are specified by -H parameter.
Usually np cannot be greater than the number of cores of the given node.
Example:
mpirun --display-map -H n0,n1 -np 24 ./cge-mpi1 48
The command will run cge-mpi1
using matrix size 48 and it distributes the processing among 2 nodes
(n0,n1) and 24 processors (each node will use 12 cores).