3.3.1 Enable MKL Support for Oracle R Distribution on a Linux Client
Follow these steps to enable MKL for Oracle R Distribution on a Linux Client.
-
Install MKL. You can download MKL from the Intel® Math Kernel Library website.
Note: To install MKL on your computer, you must have an MKL license.
-
Add
libmkl_rt.so,$RHOME/lib, and$ORACLE_HOME/libto theLD_LIBRARY_PATHsystem environment variable. For example, in the Bash shell:export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}: /path_to/libmkl_rt.so: ${RHOME}/lib: ${ORACLE_HOME}/lib -
Start R and run the
Sys.BlasLapackfunction:Sys.BlasLapack() $vendor [1] "Intel Math Kernel Library (Intel MKL)" $nthreads [1] -1
The returned value of $vendor indicates that MKL has replaced the BLAS and LAPACK that are native to R.
The returned value of nthreads indicates the number of threads to be used by MKL. By default all available threads are used ($nthreads= -1).