yannis assael | the blog

  • Home
  • About
  • Categories
    • Android
    • Computing
    • iOS
    • Machine Learning
    • MacOSX
  • GitHub
  • Mobile Apps
  • yannisassael.com


“MKL library not found” Torch7

Written by iassael on 01/03/2016. Posted in machine learning

Installing Torch with MKL support can be tricky. I had installed MKL (or Parallel Studio XE) and still Torch installation was not detecting MKL. After a long caffeinated night I found that the problem relies on the lib and include paths of CMAKE. So, given that you have already added that to your .bashrc (Ubuntu Linux) / .bash_profile (MacOSX):

. /opt/intel/bin/compilervars.sh intel64

Then all you need to do for Ubuntu is:

export CMAKE_INCLUDE_PATH=$CMAKE_INCLUDE_PATH:/opt/intel/compilers_and_libraries/linux/include:/opt/intel/mkl/include
export CMAKE_LIBRARY_PATH=$CMAKE_LIBRARY_PATH:/opt/intel/compilers_and_libraries/linux/lib/intel64:/opt/intel/mkl/lib/intel64

and for MACOSX:

export CMAKE_INCLUDE_PATH=$CMAKE_INCLUDE_PATH:/opt/intel/compilers_and_libraries/mac/include:/opt/intel/mkl/include
export CMAKE_LIBRARY_PATH=$CMAKE_LIBRARY_PATH:/opt/intel/compilers_and_libraries/mac/lib:/opt/intel/mkl/lib

Trackback from your site.

Comments (1)

  • Avatar

    aiyion

    30/04/2019 at 9:45 am | #

    Thanks sir; the hint with the library path was great!

Leave a comment