Simulating / Emulating a MPI Cluster or Supercomputer under Ubuntu Linux
April 10th, 2009 by Brad HeapOkay a few posts ago I mentioned that I had been successful in setting up my laptop as a virtual supercomputer.
Here are hopefully some relatively clear instructions on how simple it was to do.
Setting up a MPI development system on Ubuntu Linux
-
Download Ubuntu – check out the latest version at www.ubuntu.com
-
Intall the required mpi files.
-
Open a new terminal window.
-
Enter: sudo apt-get install libopenmpi1
-
Enter: sudo apt-get install libopenmpi-dbg
-
Enter: sudo apt-get install libopenmpi-dev
-
Enter: sudo apt-get install openmpi-bin
-
Enter: sudo apt-get install openmpi-common
-
Enter: sudo apt-get install openmpi-dev
-
-
Test the mpi install by compiling and running a simple program
-
mpicc testfile.c -o testfile
-
mpirun -np 2 ./testfile
-
Where np is the number of cores * number of processes on your system.
-
e.g. on a two core laptop np should be 2.
-
-
-
If you get an error regarding ssh when you enter the mpirun command install ssh
-
sudo apt-get install ssh
-
-
If you get requested for your password everytime you run mpirun set up a stored RSA key control
-
cd $HOME
-
ssh-keygen -t dsa
-
cp .ssh/id_dsa.pub .ssh/authorized_keys2
-
Further reference:
http://www.csc.cam.ac.uk/academic/practicals.html
http://www.math.umbc.edu/~gobbert/mpi.html
Tags: Computer Science, Linux, MPI, Supercomputers, Ubuntu
