Hi,
I'm experiencing link error "undefined reference to '_intel_fast_memcpy'" while trying to compile my program with g++.
Link and compile option are set using Intel MKL link line advisor for GCC.
If compiler is set to icc and match the link and compile option, the program builds and runs without any problem.
System specs related to the problems are list below.
OS : Ubuntu 14.04 64bit OS
Compiler : GCC 4.8.4
MKL : Version comes with Intel Parallel Studio 2016
Suspecting that this issue might be related setup of parallel studio but couldn't narrow it down.
Anyone experienced similar problem and solved the issue?
Regards,
Ilwoo Park
Link Copied
The full message should specify where that reference was set. For example, it might have been in the intel_thread library which requires the libiomp5. In that case, you should either specify -liomp5, or the libgomp thread library along with g++ -fopenmp. libiomp5 handles all the libgomp calls, so you may avoid using libgomp.
I think if you have the current link advisor, and use g++, you must specify whether you will use libgomp or libiomp5, in order to get the corresponding advice.
Hi
right, as Tim said, you may use either -fopenmp (libgomp) or intel libiomp5.so.
for example, using G++ and GNU openmp thread.
-Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_intel_lp64.a ${MKLROOT}/lib/intel64/libmkl_core.a ${MKLROOT}/lib/intel64/libmkl_gnu_thread.a -Wl,--end-group -lpthread -lm -ldl -fopenmp -m64 -I${MKLROOT}/include
The reference '_intel_fast_memcpy'" should be in libiomp5.so.
nm libiomp5* | grep "_intel_fast_memcpy"
0000000000000040 T __kmp_external__intel_fast_memcpy
0000000000000000 T __kmp_external__intel_fast_memcpy.A
0000000000000010 T __kmp_external__intel_fast_memcpy.J
0000000000000020 T __kmp_external__intel_fast_memcpy.M
0000000000000030 T __kmp_external__intel_fast_memcpy.P
U __kmp_external__intel_fast_memcpy
U __kmp_external__intel_fast_memcpy
00000000000c5d70 t _intel_fast_memcpy
Best Regards,
Ying
For more complete information about compiler optimizations, see our Optimization Notice.