How to used MKL (not revolution-mkl) with Debian packages
Hi folks, after testing with iPython (with pylab), I noticed that linking flag "-L/opt/intel/lib/intel64 -ligomp5" can caused many problems, please remove this part of the linking flag. The correct linking flag should be: $ gfortran -L/opt/intel/mkl/lib/intel64 -lmkl_rt -lmkl_core -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_gf_ilp64 -lgomp -lpthread -shared -Wl,-soname,libblas.so.3gf -o libblas.so.3gf.0 and $ gfortran -L/opt/intel/mkl/lib/intel64 -lmkl_rt -lmkl_core -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_gf_ilp64 -lgomp -lpthread -shared -Wl,-soname,liblapack.so.3gf -o liblapack.so.3gf.0
On Wed, 2011-11-02 at 20:24 -0400, Gong-Yi Liao wrote:
(please ignore previous mail) Hi folks, if you want to use MKL (the fast BLAS I have tested on my Thinkpad T410) with the R 2.14.0 built as Debian/Ubuntu packages available on CRAN mirror, the following tricks may work for those who want to use MKL without some known side-effects (likes openmp breaking issues), you may try to build your own libblas.so.3gf.0 with following command: $ gfortran -L/opt/intel/lib/intel64 -liomp5 -L/opt/intel/mkl/lib/intel64 -lmkl_rt -lmkl_core -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_gf_ilp64 -lgomp -lpthread -shared -Wl,-soname,libblas.so.3gf -o libblas.so.3gf. $ sudo mkdir /usr/local/lib/MKL $ sudo cp libblas.so.3gf.0 /usr/local/lib/MKL/. $ cd /usr/local/lib/MKL $ sudo ln -s libblas.so.3gf.0 libblas.so.3gf $ sudo -s $ echo "/usr/local/lib/MKL" > /etc/ld.so.conf.d/MKL.conf $ exit $ sudo ldconfig then test your R with some benchmarks, here I am using "R-benchmark-25.R", which is available at http://r.research.att.com/benchmarks/. Note: I assume that your MKL is installed under /opt/intel/.