Skip to content
This repository was archived by the owner on Jul 31, 2022. It is now read-only.

Mpirun stuff

Dylan Christopherson edited this page Aug 2, 2018 · 24 revisions

Using mpirun

which mpirun
lscpu            //Find out about the hardware you're using

mpirun -np 3 /full/path/to/file/hello_c
mpirun -np 3 --display-map /full/path/to/file/hello_c
mpirun -np 3 --oversubscribe /full/path/to/file/hello_c
mpirun -np 2 -host hostName file

mpirun -np 2 fileName : -np 2 fileName        //Run two files

https://www.open-mpi.org/faq/?category=running#mpirun-hostfile

mpirun -np 8 --hostfile hostFileName fileName

You can use mpirun in files too to run multiple commands or refer to multiple files:

mpirun --app my_appfile

In my_appfile:
-np 2 fileName
-np 2 anotherName

A great way to check where your tests/jobs are running is to create a runs on script:

runsOn.sh
#!/bin/sh
echo "Machine test: $HOSTNAME"

MPIRUN for NFS

Locate the openmpi-default-hostfile file. It's located where Open MPI was build. All of the Open MPI commands will be located in /bin of this folder while the hostfile is located in the /etc folder that is at the same level as the /bin folder. Add the ip address or hostname to it.

Example:

<IP address>:4           //OR
frutilla
Clone this wiki locally