open-mpiMPI stands for Message Passing Interface, something you would have to learn if you want to use parallel programming. You don’t have to program yourself, but there are some programs that can be run much quicker, that is, run in parallel, for example, on your dual core, quad core, or hexa-core processor. That’s where MPI comes to the rescue. OpenMPI is a type of MPI implementation, obviously open source (free) high performance computing,  developed by a bunch of academic, research, and other independent parties.

If you are a linux user, and especially if you a computer science researcher like me, chances are you have come across some codes that can be parallelized. That’s great, because science codes usually take time to finish, and if you can run them in parallel, you could save a lot of time.

List of Features of OpenMPI

  • MPI-2 standard
  • Dynamic process spawning
  • Thread safety
  • Network and process fault tolerance
  • Reliable job management
  • Single library support
  • Many job schedulers
  • Component-based design
  • Run-time instrumentation

At the moment of writing this post, the latest release of OpenMPI is 1.10.2.

This is a brief guide to installing Open MPI, version 1.10.2, in Ubuntu 14.04

  • Make sure first that you have no other MPI compilers already installed. If you do, remove them before proceeding with the next step to avoid possible conflict.
  • Download the latest stable package from the openmpi website. You can install manually, or just use wget for this:
  • Install libibnetdisc-dev. This library is used in high-performance computing. It bring low latency and high throughput. It is also  designed to be scalable.
sudo apt-get install libibnetdisc-dev
  • Decompress the downloaded file and change directory
gunzip openmpi-1.10.2.tar.gz 
tar -xvf openmpi-1.10.2.tar
cd openmpi-1.10.2
  •  Configure the installation file according to your system configuration
./configure --prefix="/home/$USER/.openmpi"
  • Install OpenMPI (Note that it may take quite some time for this operation to finish, depending on the speed of your computer)
sudo make install
  • Setup path in Environment Variable
export PATH="$PATH:/home/$USER/.openmpi/bin"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/$USER/.openmpi/lib/"
  • Test if install was successful

If everything has been installed fine, you should now be able to see the ‘How to use’ message.

At the end, check the version of your newly installed openmpi implementation by running the following command:


The first several lines will give you the info about the mpi version.