Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
7222 Discussions

Bad relocation R_X86_64_PC32 in libmkl_blacs_intelmpi20

Intel_C_Intel
Employee
476 Views
Hello there!

I was trying to create a shared object library that contained the
MKL library components of interest to our application. I get the same error using either the Gnu or Intel compilers,

g++-4.0.3 -shared -fpic -Wl,--export-dynamic -o libisc_mkl.so
reference.o -L/opt/intel/cmkl/8.1/lib/em64t
-lmkl_scalapack -lmkl_blacs_intelmpi20 -lmkl_lapack
-lmkl_em64t -lmkl -lguide
/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.0.3/../../../../x86_64-unknown-linux-gnu/bin/ld: /opt/intel/cmkl/8.1/lib/em64t/libmkl_blacs_intelmpi20.a(igesd2d_.o): relocation R_X86_64_PC32 against `BI_GetMpiGeType' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.0.3/../../../../x86_64-unknown-linux-gnu/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status

But curiously, if I use libmkl_blacs_intelmpi.a instead, the shared object creation works, but scalapack fails with runtime errors in MPI_Reduce complaining about bad types.

Has anyone ever tried this or have suggestions?
0 Kudos
0 Replies
Reply