About Me

A Computer Enthusiast who's learning as much as I can, while attempting to share and re-distribute the knowledge! Enjoy! :D

Tuesday, May 25, 2010

OpenMPI Quickstart

Setting up your environment for OpenMPI: Quickstart

Assumptions: C and C++ compilers are already installed (usually located in /usr/bin). Additionally, if you have root (or write) access to /usr/local/bin, then after untar'ing the file (step 3), remove the prefix on Step 5.

1. Download the latest openmpi source files:

  • http://www.open-mpi.org/software/ompi/v1.4/

2. Find out how many processors are available to utilize:

[mlagatuz@fedora-boot Download]$ grep 'processor.*:'\
/proc/cpuinfo | wc -l
[mlagatuz@fedora-boot Download]$

3. cd into the download directory and untar the file

[mlagatuz@fedora-boot Download]$ tar -xzf \

4. cd into the newly created openmpi- directory and view the INSTALL file. Here you will find more information on how to intall OpenMPI

[mlagatuz@fedora-boot Download]$ cd openmpi-1.4.2
[mlagatuz@fedora-boot Download]$ less INSTALL

5. Run configure (./configure) and append the prefix option with your preference of binary installation location (/home/mlagatuz/Desktop/openmpi for me)
[mlagatuz@fedora-boot openmpi-1.4.2]$ ./configure \

6. Run within the same the directory --> make all install
[mlagatuz@fedora-boot openmpi-1.4.2]$ make all install

7. cd into your home directory and edit your .bash_profile (or .cshrc) to include the binary installation location within your PATH, then source it
[mlagatuz@fedora-boot build]$ cd
[mlagatuz@fedora-boot ~]$ vi .bash_profile


You now have a fully functionally parallel processing environment!
[mlagatuz@fedora-boot ~]$ which mpic++
[mlagatuz@fedora-boot ~]$

1. MPI in 30 Minutes
  • http://www.linux-mag.com/id/5759
2. Trial & Error

No comments:

Post a Comment