Skip to content
Prev 31908 / 63424 Next

R with MKL

Hi
Do you use gcc and gfortran?
cited reference https://svn.r-project.org/R/trunk/doc/manual/R-admin.texi
| You are strongly encouraged to read the MKL User's Guide
| <snip>
| @example
| MKL="   -L$@{MKL_LIB_PATH@}                               \
|         -Wl,--start-group                               \
|                 $@{MKL_LIB_PATH@}/libmkl_gf_lp64.a        \
|                 $@{MKL_LIB_PATH@}/libmkl_gnu_thread.a     \
|                 $@{MKL_LIB_PATH@}/libmkl_core.a           \
|         -Wl,--end-group                                 \
|         -liomp5 -lpthread"
| @end example

However, It is a little different.( -lgomp and configure line)

MKL="   -L$@{MKL_LIB_PATH@}                               \
        -Wl,--start-group                               \
                $@{MKL_LIB_PATH@}/libmkl_gf_lp64.a        \
                $@{MKL_LIB_PATH@}/libmkl_gnu_thread.a     \
                $@{MKL_LIB_PATH@}/libmkl_core.a           \
        -Wl,--end-group                                 \
        -lgomp -lpthread"
./configure --with-blas="$MKL" --with-lapack="$MKL"
Please note the thing that ABI of fortran is different with Intel compiler
and GNU compiler.
difficult to detect the mistake.