I would like to add my procedure for compiling R 3.0.1 with MKL libraries. I am using Debian 7.0 on the core of the i7 intel processor, 8G RAM. First, I installed the MKL libraries, after I set the MKL related environment variables (MKLROOT and LD_LIBRARY_PATH) with this command:
>source /opt/intel/mkl/bin/mklvars.sh intel64
So, I used the following options for. / configure:
>./configure --enable-R-shlib --enable-threads=posix --with-lapack --with-blas="-fopenmp -m64 -I$MKLROOT/include -L$MKLROOT/lib/intel64 -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core -lpthread -lm"
and completed the installation with make and make install.
As a reference, I made a product between two 5000 x 5000 matrix products without MKL and received:
expired 57.455 0.104 29.033
and after compilation:
expired 15.993 0.176 4.333
real win!
source share