Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7953 Discussions

icc (8.0 & 7.0) using mpi libraries not working on Red Hat linux ES

kapurs
Beginner
300 Views
Hi-
we have a parallel code (using mpi) which compiles fine with icc(7.0) on our old red hat linux 7.0 systems.
But we get the following error when we compile it on our new red hat linux 3 ES systems, e.g. when I give execute make prmpi.x, i get the following message with icc(7.0) and icc(8.0).
Does anyone know why it doesn't compile with Red Hat linux 3.0 ES edition??
thanks-
-sumeet-
with icc(7.0)
HOME DIR>make prmpi.x
/opt/intel/compiler70/ia32/bin/icc -c -O3 -tpp7 main.C
/opt/intel/compiler70/ia32/bin/icc -c -O3 -tpp7 initpos.C
/opt/intel/compiler70/ia32/bin/icc -c -O3 -tpp7 iodata.C
/opt/intel/compiler70/ia32/bin/icc -c -O3 -tpp7 commun.C
/opt/intel/compiler70/ia32/bin/icc -c -O3 -tpp7 eigen.C
/opt/intel/compiler70/ia32/bin/icc -c -O3 -tpp7 eval.C
/opt/intel/compiler70/ia32/bin/icc -c -O3 -tpp7 ters_eval.C
/opt/intel/compiler70/ia32/bin/icc -c -O3 -tpp7 var_init.C
/opt/intel/compiler70/ia32/bin/icc -c -O3 -tpp7 cellsetup.C
/opt/intel/compiler70/ia32/bin/icc -c -O3 -tpp7 nlist.C
/opt/intel/compiler70/ia32/bin/icc -c -O3 -tpp7 integrate.C
/opt/intel/compiler70/ia32/bin/icc -O3 main.o initpos.o iodata.o commun.o eigen.o eval.o ters_eval.o var_init.o cellsetup.o nlist.o integrate.o -o prmpi.x -L/opt/intel/compiler70/ia32/lib -static -I/usr/include/ -lmpi -llam
/usr/lib/liblam.a(kill.o)(.text+0x1a2): In function `killname':
: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking

/opt/intel/compiler70/ia32/lib/libcxa.a(exception.o)(.text+0x7d): In function `std::set_unexpected(void (*)())':
: undefined reference to `pthread_mutex_lock'
/opt/intel/compiler70/ia32/lib/libcxa.a(exception.o)(.text+0x95): In function `std::set_unexpected(void (*)())':
: undefined reference to `pthread_mutex_unlock'
/opt/intel/compiler70/ia32/lib/libcxa.a(exception.o)(.text+0x107): In function `std::set_terminate(void (*)())':
: undefined reference to `pthread_mutex_lock'
/opt/intel/compiler70/ia32/lib/libcxa.a(exception.o)(.text+0x11f): In function `std::set_terminate(void (*)())':
: undefined reference to `pthread_mutex_unlock'
/opt/intel/compiler70/ia32/lib/libcxa.a(newhandler.o)(.text+0xd): In function `std::set_new_handler(void (*)())':
: undefined reference to `pthread_mutex_lock'
/opt/intel/compiler70/ia32/lib/libcxa.a(newhandler.o)(.text+0x25): In function `std::set_new_handler(void (*)())':
: undefined reference to `pthread_mutex_unlock'
/opt/intel/compiler70/ia32/lib/libunwind.a(ptn_ix86.o)(.text+0x2f): In function `_eh_get_lock':
: undefined reference to `pthread_mutex_lock'
/opt/intel/compiler70/ia32/lib/libunwind.a(ptn_ix86.o)(.text+0x42): In function `.B1.2':
: undefined reference to `pthread_mutex_lock'
/opt/intel/compiler70/ia32/lib/libunwind.a(ptn_ix86.o)(.text+0x63): In function `_eh_release_lock':
: undefined reference to `pthread_mutex_unlock'
/opt/intel/compiler70/ia32/lib/libunwind.a(ptn_ix86.o)(.text+0x76): In function `.B2.2':
: undefined reference to `pthread_mutex_unlock'
make: *** [prmpi.x] Error 1
with icc(8.0)
HOME DIR>make prmpi.x
/opt/intel_cc_80/bin/icc -c -O3 -tpp7 main.C
/opt/intel_cc_80/bin/icc -c -O3 -tpp7 initpos.C
/opt/intel_cc_80/bin/icc -c -O3 -tpp7 iodata.C
/opt/intel_cc_80/bin/icc -c -O3 -tpp7 commun.C
/opt/intel_cc_80/bin/icc -c -O3 -tpp7 eigen.C
/opt/intel_cc_80/bin/icc -c -O3 -tpp7 eval.C
/opt/intel_cc_80/bin/icc -c -O3 -tpp7 ters_eval.C
/opt/intel_cc_80/bin/icc -c -O3 -tpp7 var_init.C
/opt/intel_cc_80/bin/icc -c -O3 -tpp7 cellsetup.C
/opt/intel_cc_80/bin/icc -c -O3 -tpp7 nlist.C
/opt/intel_cc_80/bin/icc -c -O3 -tpp7 integrate.C
/opt/intel_cc_80/bin/icc -O3 main.o initpos.o iodata.o commun.o eigen.o eval.o ters_eval.o var_init.o cellsetup.o nlist.o integrate.o -o prmpi.x -L/opt/intel_cc_80/lib -static -I/usr/include/ -lmpi -llam
/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../../liblam.a(kill.o)(.text+0x1a2): In function `killname':
: Using 'getpwuid' in statically linked applications requires at runtime the shared
libraries from the glibc version used for linking
main.o(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
initpos.o(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
iodata.o(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
commun.o(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
eigen.o(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
eval.o(.eh_frame+0x12): more undefined references to `__gxx_personality_v0' follow
make: *** [prmpi.x] Error 1


0 Kudos
1 Reply
TimP
Honored Contributor III
300 Views
These look like symptoms of failing to set C++ options consistently in lam configure. The lam-mpi FAQ has a good guide on how to ask questions on the lam mailing list, such that people can be helpful right off. Without you providing such information, no one can say yes, they know what your problem is. lam-mpi people do prefer to answer about current lam versions and will be quick to tell you when you are using too ancient a version. Typical lam configure for icc/icpc/ifort:
export CFLAGS='-fpic -DLAM_USE_SHIFTING -xW -i_static'
export CXXFLAGS='-xW -i_static'
export FFLAGS='-xW -i_static'
./configure --with-cc=icc --with-cxx=icpc --with-fc=ifort --prefix=/usr/lam32 --without-romio [--enable-shared --without-mpi2cpp]

according to your requirements

Then, before you try to build your application, set your PATH and LD_LIBRARY_PATH to pick up the lam-mpi which you just installed.

If you still see undefined pthreads references, check to see that you have properly installed pthreads libraries, and that your icc installation is inheriting paths correctly from your gcc installation. If you changed gcc from the time when you installed icc, you must re-install icc.

I didn't suggest static libraries above. If you wish static pthreads libraries, I believe they come from a separate .rpm from the dynamic ones. It's a little difficult to believe you got some of those messages without asking for static link.
0 Kudos
Reply