Install Open MPI in Ubuntu 14.04, 13.10

< The original post can be found here >

This post introduces the steps for installing the OPENMPI program in Ubuntu system for sudo user. My testing environment is :

  • Ubuntu 14.04 TLS ;
  • `build-essential` packages installed ;

Now I will enumerate the steps below:

Step – 1 : Install the basic dependency packages

sudo apt-get install libibnetdisc-dev

Step – 2 : Download the latest openmpi package from here ;

Step – 3: Extract the openmpi package and open the directory ;

Step – 4: Configure the installation file

./configure --prefix="/home/$USER/.openmpi"

Step – 5: Install the program

make && sudo make install

Step – 6: Setup environment path and test mpirun

export PATH="$PATH:/home/$USER/.openmpi/bin"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/$USER/.openmpi/lib/"
mpirun

If everything goes fine, then you should see the following message :

Step – 7: Add environment path into global profile.

vim /etc/profile

Add the previous export codes in Step 6 in the profile.

Another alternative to Step 7 is to edit the .bashrc file. This is useful if you install the openmpi for local user without massing up the global environment settings:

Step – 7b (for local user profile)

add PATH=”$PATH:/home/$USER/.openmpi/bin” and LD_LIBRARY_PATH=”$LD_LIBRARY_PATH:/home/$USER/.openmpi/lib/” into .bashrc file, then run source .bashrc

Done !

2 thoughts on “Install Open MPI in Ubuntu 14.04, 13.10

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s