- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to compile and load a code that uses MKL libraries to solve an eigenvalue problem. I use the following commands based on what the Intel MKL link line advisor tells me:
ifort -c -i8 -qopenmp -I${MKLROOT}/include $OPT dggev_solver.f
ifort -o xgv_omp dggev_solver.o -I. -L${MKLROOT}/lib -Wl,-rpath,${MKLROOT}/lib -lmkl_intel_ilp64 -lmkl_core -lmkl_intel_thread -lpthread -lm -ldl
However, when these are used, there seems to be symbols that are not found (see below):
+ OPT=-O2
+ ifort -c -i8 -qopenmp -I/opt/intel//compilers_and_libraries_2016.3.170/mac/mkl/include -O2 dggev_solver.f
+ ifort -o xgv_omp dggev_solver.o -I. -L/opt/intel//compilers_and_libraries_2016.3.170/mac/mkl/lib -Wl,-rpath,/opt/intel//compilers_and_libraries_2016.3.170/mac/mkl/lib -lmkl_intel_ilp64 -lmkl_core -lmkl_intel_thread -lpthread -lm -ldl
Undefined symbols for architecture x86_64:
"___kmpc_begin", referenced from:
_MAIN__ in dggev_solver.o
"___kmpc_end", referenced from:
_MAIN__ in dggev_solver.o
ld: symbol(s) not found for architecture x86_64
What needs to be added to my compilation lines to fix this?
Thanks, Don
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, that fixed my compilation and loading problem. Also, I had found earlier that just adding -mkl to to the load fixed things.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
two my cents wrt "-mkl" option : with this option, Compiler will link with LP64 ( not ILP64 API you originally pointed.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page