Skip to content

Conversation

@shehzan10
Copy link
Member

Added building support with MKL for BLAS, FFTW and LAPACKE.

Static linking command:

-DUSE_CPU_MKL=ON -DUSE_OPENCL_MKL=ON
-DCBLAS_LIBRARIES="/opt/intel/mkl/lib/libmkl_intel_thread.a;/opt/intel/mkl/lib/libmkl_intel_lp64.a;/opt/intel/mkl/lib/libmkl_core.a"
-DFFTW_LIB="/opt/intel/mkl/lib/libmkl_intel_thread.a;/opt/intel/mkl/lib/libmkl_intel_lp64.a;/opt/intel/mkl/lib/libmkl_core.a"
-DFFTWF_LIB="/opt/intel/mkl/lib/libmkl_intel_thread.a;/opt/intel/mkl/lib/libmkl_intel_lp64.a;/opt/intel/mkl/lib/libmkl_core.a"
-DLAPACK_LIBRARIES="/opt/intel/mkl/lib/libmkl_intel_thread.a;/opt/intel/mkl/lib/libmkl_intel_lp64.a;/opt/intel/mkl/lib/libmkl_core.a;/opt/intel/compilers_and_libraries/mac/compiler/lib/libiomp5.a;/usr/lib/libdl.dylib;/usr/lib/libpthread.dylib;/usr/lib/libm.dylib"
-DFFTW_INCLUDES="/opt/intel/mkl/include/fftw/"
-DLAPACK_INCLUDE_DIR="/opt/intel/mkl/include/"

For dynamic linking with mkl_rt, set the environment variable INTEL_MKL_ROOT=/opt/intel/mkl.
Note: /opt/intel/mkl/lib and /opt/intel/compilers_and_libraries/mac/lib/ (for libiomp5.dylib needed by libmkl_intel_thread.dylib) will need to be added to DYLD_LIBRARY_PATH.

@shehzan10 shehzan10 added this to the 3.3.0 milestone Feb 22, 2016
* Uses INTEL_MKL_ROOT as enviornment variable. Commonly /opt/intel/mkl
* If using RT, then add /opt/intel/mkl/lib and
  /opt/intel/compilers_and_libraries/mac/lib/ to DYLD_LIBRARY_PATH
pavanky added a commit that referenced this pull request Feb 24, 2016
@pavanky pavanky merged commit 9421284 into arrayfire:devel Feb 24, 2016
@shehzan10 shehzan10 deleted the osx-mkl-fixes branch February 25, 2016 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants