Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Adding MKL to Path


I just installed Parallel Studio and need to make use of the C compiler, Fortran compiler, and math kernel library. After installing, I add source /opt/intel/bin/ intel64 and source /opt/intel/mkl/bin/ intel64 to my bashrc file (I'm running Fedora linux). When I go to check that everything has correctly added to my path I run "which ifort" and "which icc" and see the location of the ifort and icc executables. However, this method doesn't seem to work with MKL given that I don't believe there are executables for which I could run "which <blank>".

I'm wondering how to correctly add MKL to my path and environment and then confirm that it has been done correctly.


0 Kudos
1 Reply
Black Belt

If you installed your MKL and your compilers by the same installer, compilervars should be invoking mklvars automatically, so MKL will appear in LD_LIBRARY_PATH (something like dyld_library_path for Mac?)


Does e.g. locate help?  (look at the full names of the MKL libraries of interest).

"which" follows paths for executables.  shared libraries on Windows are found that way, but not on other OS.

So, with bash in a WIndows compiler cmd window,

$ which mkl_intel_thread.dll
/cygdrive/c/Program Files (x86)/Intel_sw_development_tools/compilers_and_libraries_2016.0.063/windows/redist/intel64/mkl/mkl_intel_thread.dll

but you must adjust your habits to your OS.  I guess it's good to make these checks so you get the MKL version you intend.

Try some general web discussion forums for the OS of your choice, if the question isn't specific to Intel tools e.g.

0 Kudos