3.6.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.

  1. 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.

  2. Add libmkl_rt.so, $RHOME/lib, and $ORACLE_HOME/lib to the LD_LIBRARY_PATH system 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
    
  3. Start R and execute the Sys.BlasLapack function:

    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).