使用icc链接到gsl时出现intel_sse2问题 [英] intel_sse2 problems when linking to gsl with icc
问题描述
我的程序同时链接到PETSc和gsl,并且两个库都是使用icc编译的.这是链接命令:
My program links to both PETSc and gsl, and both libraries were compiled with icc. Here's the link command:
/usr/local/mpich2/bin/mpicc -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -g3 -I/usr/local/gsl-icc-1.15/include/ -I/usr/local/gsl-icc-1.15/include/ -L/usr/local/gsl-icc-1.15/lib/ -lgsl -lgslcblas prog_name.o -L/usr/local/petsc-3.2-p6/lib -lpetsc -lX11 -lpthread -llapack -lblas -L/central/intel/Compiler-11.1.072/mkl/lib/em64t -L/central/intel/Compiler-11.1.072/lib/intel64 -L/central/intel/Compiler-11.1.072/tbb/intel64/cc3.4.3_libc2.3.4_kernel2.6.9/lib -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2 -ldl -lgcc_s -lifport -lifcore -limf -lsvml -lm -lipgo -lirc -lpthread -lirc_s -lm -lstdc++ -lstdc++ -ldl -lgcc_s -ldl -o prog_name
MPICH_CC
设置为icc,因此mpicc
调用intel编译器.
MPICH_CC
is set to icc, so mpicc
calls the intel compiler.
当我尝试链接到gsl .so
文件时,出现以下错误:
When I try to link to the gsl .so
file, I get the following errors:
gsl-icc-1.15/lib/libgsl.so: undefined reference to `__intel_sse2_strcpy'
gsl-icc-1.15/lib/libgsl.so: undefined reference to `__intel_sse2_strchr'
gsl-icc-1.15/lib/libgsl.so: undefined reference to `__intel_sse2_strncpy'
此错误可能是什么原因? gsl与intel编译器不兼容吗?
What could be the cause of this error? Is gsl incompatible with the intel compiler?
推荐答案
在将某些代码与gcc链接到用icc编译的PETSc版本时,我也收到相同的错误消息.甚至,当使用最新的Intel 12.x编译器作为最终代码,并使用Intel 11.x编译PETSc时,也会产生与Intel 12.x使用11.x相同的错误消息.
I also get the same error message when linking some code with gcc against a PETSc version that was compiled with icc. Even more, when using the newest Intel 12.x compiler for the final code, and compiling PETSc with Intel 11.x results in the same error message as Intel 12.x uses 11.x.
因此,检查一下,该mpicc确实使用了Intel 11.1.072编译器.检查mpic++ -show
和which icc
.
So check, that mpicc really use the Intel 11.1.072 compiler. Check for mpic++ -show
and which icc
.
这篇关于使用icc链接到gsl时出现intel_sse2问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!