Community
cancel
Showing results for 
Search instead for 
Did you mean: 
nas_09
Beginner
226 Views

Trouble running starter program, Intel mkl linux

Hey all, I installed and setup the Intel MKL libraries on a 64-bit machine running ubuntu linux and have tried to follow the directions in the "Getting Started" document. However, when I attempt to compile the code using gcc using the command: gcc -m32 mkl_lab_solution.c -lmkl_intel -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm, I get this error:

"/usr/bin/ld: cannot find -lmkl_intel
/usr/bin/ld: skipping incompatible /home/nick/Desktop/IntelMKL/mkl/lib/intel64/libmkl_intel_thread.so when searching for -lmkl_intel_thread
/usr/bin/ld: skipping incompatible /home/nick/Desktop/IntelMKL/mkl/lib/intel64/libmkl_intel_thread.a when searching for -lmkl_intel_thread
/usr/bin/ld: cannot find -lmkl_intel_thread
/usr/bin/ld: skipping incompatible /home/nick/Desktop/IntelMKL/mkl/lib/intel64/libmkl_core.so when searching for -lmkl_core
/usr/bin/ld: skipping incompatible /home/nick/Desktop/IntelMKL/mkl/lib/intel64/libmkl_core.a when searching for -lmkl_core
/usr/bin/ld: cannot find -lmkl_core
/usr/bin/ld: skipping incompatible /home/nick/Desktop/IntelMKL/compiler/lib/intel64/libiomp5.so when searching for -liomp5
/usr/bin/ld: skipping incompatible /home/nick/Desktop/IntelMKL/compiler/lib/intel64/libiomp5.a when searching for -liomp5
/usr/bin/ld: cannot find -liomp5
collect2: ld returned 1 exit status"

I apologize if this is a stupid question, I'm new to the command prompt environment and don't fully understand the steps that're going on, but I can't wrap my head around what's actually wrong here. Help me out?
0 Kudos
3 Replies
mecej4
Black Belt
226 Views

Set the environmental variable LD_LIBRARY_PATH to include the directory containing the 32-bit MKL libraries.

Or, leave out the -m32 option to GCC if you have only the 64-bit version of MKL installed.
Gennady_F_Intel
Moderator
226 Views

when the installation of Intel MKL for Linux* OS is complete, set the INCLUDE, MKLROOT,LD_LIBRARY_PATH, MANPATH, LIBRARY_PATH, CPATH, FPATH, and NLSPATH environment variables in thecommand shell using one of the script files in the bin subdirectory of the Intel MKL installation directory.You can find these scripts , as an example, from here "\mkl\bin"

Fergal_C_
Beginner
226 Views

I was having a similar issue, even after running the setup script.

Make sure you are using the correct flags for your architecture. You can find a handy configurator here:

https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor

Reply