R with MKL
On Mon, 2009-03-16 at 18:33 -0400, Cristi?n wrote:
Hi, I have seen a lot of problems from people trying to compile R with MKL. So I am writing my experience in case it helps and to ask one question. I installed R-2.8.1.patched in Ubuntu 9.04 (gcc 4.3.3) using MKL 10.1.1.019.
The R-admin manual has been updated with instructions for MKL since the last thread on the topic. You should look there in section A.3.1.4.
I configured correctly (following MKL userguide) with : sudo ./configure --with-blas="-I/opt/intel/mkl/10.1.1.019/include -L/opt/intel/mkl/10.1.1.019/lib/em64t -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread" --with-lapack="-I/opt/intel/mkl/10.1.1.019/include -L/opt/intel/mkl/10.1.1.019/lib/em64t -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread" But in order to compile had to edit src/modules/lapack/vecLibg95c.c and comment out the include. Weird, since I am not building for Mac.
OK. There are two things happening here. You are using the wrong interface layer. With gcc you need to use -lmkl_gf_lp64, since the way that complex numbers are represented differs between Intel and GNU compilers. There is a known workaround for this problem for MacOs X, using the cblas interface. Apparently, this workaround is also being applied here. I will look into it.
Make check returned no error. I checked with ldd that R is linked
against MKL. All demos run
I set MKL_NUM_THREADS={1,2} environment var and run R-benchmark-25.R
from (http://r.research.att.com/benchmarks/R-benchmark-25.R). Not all
tests use MKL so you get around 20% improvement for 2 cores. Also
monitoring with top you can see which tests use 2 cores.
Question: Am I set? What was that error relating to vecLib? I need to
install now on a bigger multicore server for data-mining and dont want
to deliver a defective installation. Maybe I could run a larger
check-benchmark.
Thanx a lot,
C.
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
-----------------------------------------------------------------------
This message and its attachments are strictly confidenti...{{dropped:8}}