Hi
I'm trying to compile the dtrnlsp example but there's linker problem. This is what I get:
Invoking: Intel Intel 64 C++ Linker
icpc -L/usr/lib -L/opt/intel/Compiler/11.1/056/mkl/lib/em64t -mkl=parallel -o"Inte_Optimisation_Solvers_Test" ./test.o -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lmkl_solver_ilp64 -lpthread
./test.o: In function `main':
../test.cpp:(.text+0x152): undefined reference to `dtrnlsp_init'
../test.cpp:(.text+0x1ee): undefined reference to `dtrnlsp_solve'
../test.cpp:(.text+0x251): undefined reference to `dtrnlsp_get'
../test.cpp:(.text+0x269): undefined reference to `dtrnlsp_delete'
../test.cpp:(.text+0x281): undefined reference to `MKL_Free_Buffers'
../test.cpp:(.text+0x2bc): undefined reference to `MKL_Free_Buffers'
../test.cpp:(.text+0x330): undefined reference to `djacobi'
../test.cpp:(.text+0x34c): undefined reference to `MKL_Free_Buffers'
../test.cpp:(.text+0x575): undefined reference to `MKL_Free_Buffers'
../test.cpp:(.text+0x59e): undefined reference to `MKL_Free_Buffers'
../test.cpp:(.text+0x5c7): undefined reference to `MKL_Free_Buffers'
As far as I'm aware, all the relevant libraries are being linked against. So, is there anything else I'm doing wrong?
Thanks
Ted
I'm trying to compile the dtrnlsp example but there's linker problem. This is what I get:
Invoking: Intel Intel 64 C++ Linker
icpc -L/usr/lib -L/opt/intel/Compiler/11.1/056/mkl/lib/em64t -mkl=parallel -o"Inte_Optimisation_Solvers_Test" ./test.o -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lmkl_solver_ilp64 -lpthread
./test.o: In function `main':
../test.cpp:(.text+0x152): undefined reference to `dtrnlsp_init'
../test.cpp:(.text+0x1ee): undefined reference to `dtrnlsp_solve'
../test.cpp:(.text+0x251): undefined reference to `dtrnlsp_get'
../test.cpp:(.text+0x269): undefined reference to `dtrnlsp_delete'
../test.cpp:(.text+0x281): undefined reference to `MKL_Free_Buffers'
../test.cpp:(.text+0x2bc): undefined reference to `MKL_Free_Buffers'
../test.cpp:(.text+0x330): undefined reference to `djacobi'
../test.cpp:(.text+0x34c): undefined reference to `MKL_Free_Buffers'
../test.cpp:(.text+0x575): undefined reference to `MKL_Free_Buffers'
../test.cpp:(.text+0x59e): undefined reference to `MKL_Free_Buffers'
../test.cpp:(.text+0x5c7): undefined reference to `MKL_Free_Buffers'
As far as I'm aware, all the relevant libraries are being linked against. So, is there anything else I'm doing wrong?
Thanks
Ted
链接已复制
1 回复
Guessing your system parameters based on your example, the link line advisor suggests this:
-L$MKLPATH $MKLPATH/libmkl_solver_ilp64.a -Wl,--start-group -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -Wl,--end-group -openmp -lpthread
You'll need to add libmkl_solver_ilp64 for sure. Some of the Free_Buffer symbols might be missed because you don't have the grouping constructs.
-Todd