Simulating / Emulating a MPI Cluster or Supercomputer under Ubuntu Linux

Okay 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

  1. Download Ubuntu – check out the latest version at www.ubuntu.com

  2. Intall the required mpi files.

    For Ubuntu 9.04:
    In a terminal window enter:
    sudo apt-get install libopenmpi1 libopenmpi-dbg libopenmpi-dev openmpi-bin openmpi-common openmpi-dev

    For Ubuntu 10.04:
    In a terminal window enter:
    sudo apt-get install libopenmpi1.3 libopenmpi-dbg libopenmpi-dev openmpi-bin openmpi-common openmpi-dev

  3. Test the mpi install by compiling and running a simple program

    1. mpicc testfile.c -o testfile

    2. mpirun -np 2 ./testfile

      1. Where np is the number of cores * number of processes on your system.

      2. e.g. on a two core laptop np should be 2.

  4. If you get an error regarding ssh when you enter the mpirun command install ssh

    1. sudo apt-get install ssh

  5. If you get requested for your password everytime you run mpirun set up a stored RSA key control

    1. cd $HOME

    2. ssh-keygen -t dsa

    3. 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