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
export 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)
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.
LikeLike
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
LikeLike
Hi Sirs,
I followed your instruction, but I got error messages when make all. Can you help me? I did not know how to using -rpath or -rpath-link. I serached on google someone suggest -shared-intel, but it did not work.
Thanks.
John
OpenMPI 2.0.1
Intel compiler: parallel_studio_xe_2016_update3
.bash_profile
PATH=$PATH:$HOME/bin
PATH=$PATH:/opt/intel/compilers_and_libraries/linux/bin/intel64
export PATH=/usr/local/bin:${PATH}
export LD_LIBRARY_PATH=/usr/local/lib:${LD_LIBRARY_PATH}
ld: warning: libimf.so, needed by ../../../ompi/.libs/libmpi.so, not found (try using -rpath or -rpath-link)
ld: warning: libsvml.so, needed by ../../../ompi/.libs/libmpi.so, not found (try using -rpath or -rpath-link)
ld: warning: libirng.so, needed by ../../../ompi/.libs/libmpi.so, not found (try using -rpath or -rpath-link)
ld: warning: libintlc.so.5, needed by ../../../ompi/.libs/libmpi.so, not found (try using -rpath or -rpath-link)
ld: .libs/ompi_info: hidden symbol `__intel_cpu_features_init_x’ in /opt/intel/compilers_and_libraries_2016.3.210/linux/compiler/lib/intel64_lin/libirc.a(cpu_feature_disp.o) is referenced by DSO
ld: final link failed: Nonrepresentable section on output
make[2]: *** [ompi_info] Error 1
make[2]: Leaving directory `/root/openmpi-2.0.1/ompi/tools/ompi_info’
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/openmpi-2.0.1/ompi’
make: *** [all-recursive] Error 1
[root@localhost openmpi-2.0.1]#
LikeLike