Gong-Yi Liao
2011-Nov-03 00:15 UTC
[R-sig-Debian] How to used MKL (not revolution-mkl) with Debian packages
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 works for 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/. * * -- Gong-Yi Liao Department of Statistics University of Connecticut 215 Glenbrook Road U4120 Storrs, CT 06269-4120 [[alternative HTML version deleted]]
Gong-Yi Liao
2011-Nov-03 00:23 UTC
[R-sig-Debian] How to used MKL (not revolution-mkl) with Debian packages
(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/. -- Gong-Yi Liao Department of Statistics University of Connecticut 215 Glenbrook Road U4120 Storrs, CT 06269-4120
Gong-Yi Liao
2011-Nov-03 00:24 UTC
[R-sig-Debian] How to used MKL (not revolution-mkl) with Debian packages
(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/. -- Gong-Yi Liao Department of Statistics University of Connecticut 215 Glenbrook Road U4120 Storrs, CT 06269-4120
Gong-Yi Liao
2011-Nov-03 02:35 UTC
[R-sig-Debian] 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/. >
bfb
2012-Dec-03 18:40 UTC
[R-sig-Debian] How to used MKL (not revolution-mkl) with Debian packages
Hey there, Thanks for providing this information. I've been trying to link R to MKL BLAS for about a week, and this is a huge breakthrough! You're great! Did you also link libRlapack.so to MKL? If so, did you use the same flags? Thanks much.