Building OpenMPI with Intel Compilers


Modified from Performance Tools for Software Developers – Building Open MPI* with the Intel® compilers

Step 1: Download the OpenMPI Software from http://www.open-mpi.org/ . The current stable version at point of writing is OpenMPI 1.3.2

Step 2: Download and Install the Intel Compilers from Intel Website. More information can be taken from Free Non-Commercial Intel Compiler Download

Step 3: Add the Intel Directory Binary Path to the Bash Startup

At my ~/.bash_profile directory, I've added
PATH=$PATH:/opt/intel/Compiler/11.0/081/bin/intel64

At command prompt

# source .bashrc

Step 4: Configuration Information

# source /opt/intel/Compiler/11.0/081/bin/compilervars.sh
# gunzip -c openmpi-1.2.tar.gz tar xf -
# cd openmpi-1.2
#./configure --prefix=/usr/local CC=icc CXX=icpc F77=ifort FC=ifort
# make all install

Step 5: Setting PATH environment for OpenMPI
At my ~/.bash_profile directory, I’ve added.

export PATH=/usr/local/bin:${PATH} 
export LD_LIBRARY_PATH=/opt/intel/Compiler/11.0/081/lib/intel64:${LD_LIBRARY_PATH}
(The LD_LIBRARY_PATH must point to /opt/intel/Compiler/11.0/081/lib/intel64/libimf.so)

Step 6: test

$ mpicc --v
cc version 12.1.5 (gcc version 4.4.6 compatibility)
Advertisements

2 thoughts on “Building OpenMPI with Intel Compilers

  1. Hi,
    I have installed both the openmpi and intel compiler.
    I did the configuration as shown above and added the following to my bashrc

    PATH=$PATH:/usr/local/composer_xe_2011_sp1.7.256/bin/ia32

    export PATH=/usr/local/bin:${PATH}
    export LD_LIBRARY_PATH=”/usr/local/composer_xe_2011_sp1.7.256/compiler/lib:$LD_LIBRARY_PATH”:${LD_LIBRARY_PATH}

    However when I use mpicc the compiler is still gcc, and for mpif77 and mpif90 the compiler is still gfortran.

    Hope someone here is able to help.

    • Hi Shawn,

      Did your .bash_profile (which is activated first when you logged on) has the following information
      ################################
      # .bash_profile

      # Get the aliases and functions
      if [ -f ~/.bashrc ]; then
      . ~/.bashrc
      fi
      #####################

      Try source .bashrc and let me know whether you can get icc

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s