--
MikeGore - 05 Nov 2012
openmpi
- openmpi allows programs to be run cooperatively with other users and share resources. It can trivially be extended across several machines.
Documentation
Installation
- aptitude install libopenmpi-dev libopenmpi1.3 openmpi-bin openmpi-common openmp-doc
Example Code
Note: Source files for this example are attached to this TWIKI
- Or asimov:/coregroup1/images/ubuntu-scripts/cluster/mpi-code
Example Files
- We assume the files live in /opt/mpi-code
- CHange mpi-test to modify this assumption
- mpi-test - Script to compile an mpi-hello.c
- mpi-hello - mpi-hello binary
- mpi-hello.c - source file for our test
- mpi-nodes.conf - mpi node configuration file to use
Notes
- There is a C program called mpi-hello.c and a script called mpi-test that runs the program on the computers and cores defined in mpi-nodes.conf
- mpi-test test script options: *
-loadbalance
which means spreadevenly across all cpu/nodes * -np 4
which is the number of processes in total to run.
Example Run Results
- I ran the test on swag.cs - a machine has 8 cores.
cat mpi-nodes.conf
swag.cs slots=8
cd /opt/mpi-code
./mpi-test
Process 0 on swag.cs out of 4
Process 1 on swag.cs out of 4
Process 2 on swag.cs out of 4
Process 3 on swag.cs out of 4