Community
cancel
Showing results for 
Search instead for 
Did you mean: 
160 Views

symlink MKL blas library for use by R

Hi, 

Can anyone please help me understand which .dylib to symlink for use by R on mac osx?

As an example I have used the following commands to try and link:

 

cd /Library/Frameworks/R.framework/Resources/lib

ln -sf /opt/intel/compilers_and_libraries_2018.3.185/mac/mkl/lib/libmkl_intel.dylib libRblas.dylib

 

I have tried symlinking various libraries, but still now joy. The error I when trying to run benchmark tests in R is: 

dyld: Symbol not found: _MKL_Detect_Cpu_Global_Lock
  Referenced from: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.dylib
  Expected in: flat namespace
 in /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.dylib
Command terminated abnormally.
        0.01 real         0.00 user         0.00 sys

I am using: 

macOS 10.13.5
R version 3.5.1 (2018-07-02) \ Platform: x86_64-apple-darwin15.6.0 (64-bit)
RStudio Version 1.1.456

Please let me know if you need any further info. Any help would be greatly appreciated.

Thanks, 

Atanas.

0 Kudos
1 Reply
Ying_H_Intel
Employee
160 Views

Hi Atanas, 

Please refer to :  https://software.intel.com/en-us/articles/quick-linking-intel-mkl-blas-lapack-to-r

Best Regards,

Ying 

 

and if you run into issue, please pay attention  and DYLD_LIBRARY_PATH: 

R uses GNU OpenMP multithread library libgomp.so, and Intel MKL uses Intel OpenMP multithread library, from Intel MKL 11.1.3 onwards, we provided the flexibility of supporting GNU threading layer by setting certain environment variables as explained in the MKL reference manual section here https://software.intel.com/en-us/node/528522/)

Please set the MKL interface and threading layer to GNU and LP64 as

$export  MKL_INTERFACE_LAYER=GNU,LP64

$export  MKL_THREADING_LAYER=GNU

Reply