Thursday, September 5, 2013

Encountering __intel_sse2_strlen when compiling OpenMPI with Intel Compilers

I was compiling OpenMPI 1.6.x and Intel Compiler XE 2013, I used the following configuration found in

#./configure --prefix=/usr/local CC=icc CXX=icpc F77=ifort FC=ifort
Do specify CC=icc CXX=icpc F77=ifort FC=ifort as if you miss one of the parameters, it will take the default. For example, if you do not specify CXX=icpc, it will adopt CXX=g++
but when I run
# make -j8

I got this error:
..../openmpi-1.6.2/ompi/contrib/vt/vt/tools/opari/tool/../../../util/util.c:45: 
undefined reference to `__intel_sse2_strlen'
..../openmpi-1.6.2/ompi/contrib/vt/vt/tools/opari/tool/../../../util/util.c:61: 
undefined reference to `__intel_sse2_strlen'
..../openmpi-1.6.2/ompi/contrib/vt/vt/tools/opari/tool/../../../util/util.c:46: 
undefined reference to `__intel_sse2_strlen'
..../openmpi-1.6.2/ompi/contrib/vt/vt/tools/opari/tool/../../../util/util.c:46: 
undefined reference to `__intel_sse2_strlen' 
......
......

The solution is to do the following:

Firstly, make sure you compile with the following
# source /usr/local/intel/composerxe/bin/compilervars.sh
Do it again
#./configure --prefix=/usr/local CC=icc CXX=icpc F77=ifort FC=ifort
Run the make again
# make -j8
# make install

No comments: