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

icpc: library linking error

Sangamesh_B_
Beginner
578 Views
Hi,

I'm installing charm++ with mvapich2-1.0.3 ofa stack, a parallel programming Object Oriented langauge (similar to MPI) using Intel C++ 10 version compilers on Rocks 4.3 CentOS Linux.

The charm++ is built successfully, with no errors.

When I try to compile a sample charm++ program, its giving following errors:

[root@localhost simplearrayhello]# make
../../../bin/charmc hello.ci
../../../bin/charmc -c hello.C
../../../bin/charmc -language charm++ -o hello hello.o
icpc: command line remark #10010: option '-static-libcxa' is deprecated and will be removed in a future release. See '-help deprecated'
ld: skipping incompatible /usr/lib/libpthread.so when searching for -lpthread
ld: skipping incompatible /usr/lib/libpthread.a when searching for -lpthread
ld: skipping incompatible /usr/lib/libpthread.so when searching for -lpthread
ld: skipping incompatible /usr/lib/libpthread.a when searching for -lpthread


...
....

ld: skipping incompatible /usr/lib/libdl.so when searching for -ldl
ld: skipping incompatible /usr/lib/libdl.a when searching for -ldl

...

ld: skipping incompatible /usr/lib/libm.so when searching for -lm
ld: skipping incompatible /usr/lib/libm.a when searching for -lm
ld: skipping incompatible /usr/lib/libm.so when searching for -lm
ld: skipping incompatible /usr/lib/libm.a when searching for -lm

..

ld: skipping incompatible /usr/lib/libc.so when searching for -lc
ld: skipping incompatible /usr/lib/libc.a when searching for -lc
...

ld: skipping incompatible /usr/lib/libdl.so when searching for -ldl
ld: skipping incompatible /usr/lib/libdl.a when searching for -ldl

....

/opt/MPI/mvapich2_intel/lib/libmpich.a(rdma_iba_init.o)(.text+0xa7): In function `MPIDI_CH3I_CM_Finalize':
: undefined reference to `ibv_dereg_mr'

....
/opt/MPI/mvapich2_intel/lib/libmpich.a(rdma_iba_priv.o)(.text+0x86e): In function `cm_qp_create':: undefined reference to `ibv_create_qp'

...

/opt/MPI/mvapich2_intel/lib/libmpich.a(cm.o)(.text+0x3433): In function `MPICM_Init_UD':
: undefined reference to `ibv_modify_qp'
Fatal Error by charmc in directory /opt/apps/namd_intel/charm-5.9/tests/charm++/simplearrayhello
Command icpc -static-libcxa -L/opt/MPI/mvapich2_intel/lib -L/usr/lib
-L/opt/MPI/mvapich2_intel/lib -L/usr/lib -o hello -L../../../bin/../lib -I../../../bin/../include
../../../bin/../lib/libldb-rand.o hello.o moduleinit16063.o ../../../bin/../lib/libmemory-default.o
../../../bin/../lib/libthreads-default.o -lck -lconv-cplus-y -lconv-core -lconv-util
-L/opt/MPI/mvapich2_intel/lib -L/usr/lib -lckqt -lmpich -lpthread -lpthread -ldl -lpthread -lm returned error code 1
charmc exiting...
make: *** [hello] Error 1

I think, icpc is not able to link/find with OFED and mvapich2 libraries.

May I know how to resolve this error?

Thanks,
Sangamesh
0 Kudos
1 Reply
TimP
Honored Contributor III
578 Views
The messages appear to indicate that you are trying to mix 32-bit and x86-64 64-bit objects and libraries, and are inconsistent with your assertion of a correct build. Supposing that you are running the x86-64 OS, the usual way would be to run 64-bit OFED and mvapich2 libraries, requiring use of the 64-bit icpc (the one usually installed under /opt/intel/fce/bin). You would also require LD_LIBRARY_PATH settings at run time so as to use the same libraries as you had at link time.
0 Kudos
Reply