Skip to content
Prev 27513 / 63424 Next

Problem building R with Intel MKL v10 BLAS

Michael Braun <braunm <at> MIT.EDU> writes:
---
I now recall a similar problem with my install of MKL V10. Here is the info:

I got the 10.X, layered library version of MKL 10.X working on R-2.6.1a. I 
set the full path information for the R configuration blas and lapack
option:

--with-blas="-L/.../intel/mkl/10.0.011/lib/em64t -lRblas -lmkl_sequential
-lmkl_lapack -lmkl_core -lpthread"
--with-lapack="-L/.../intel/mkl/10.0.011/lib/em64t -lRlapack -lmkl_sequential
-lmkl_lapack -lmkl_core -lpthread"

In this case, libRblas.so and libRlapack.so are both linked to 
libmkl_gf_lp64.so in the em64t directory. There must be some internal error
in the R configuration and make processing, because it would not pick up the
primary path specification for the mkl libraries location. Instead, I was 
able to define:

*******critical step to get around a possible R bug*******
sh-3.00$ export LD_RUN_PATH=/.../intel/mkl/10.0.011/lib/em64t

After that, I was able to perform the R configure with no errors. Then the
make also worked with no errors. The BLAS_LIBS and LAPACK_LIBS variables
were properly defined, and the path to the MKL libraries was properly
defined in ldpaths:

sh-3.00$ /.../R-2.6.1a/bin/R CMD config BLAS_LIBS
-L/.../intel/mkl/10.0.011/lib/em64t -lRblas -lmkl_sequential -lmkl_lapack
-lmkl_core -lpthread
sh-3.00$ /.../R-2.6.1a/bin/R CMD config LAPACK_LIBS
-L/.../R-2.6.1a/intel/mkl/10.0.011/lib/em64t -lRlapack -lmkl_sequential
-lmkl_lapack -lmkl_core -lpthread
sh-3.00$

power02(43)% more ldpaths
...
${R_LD_LIBRARY_PATH=${R_HOME}/lib:/s/gcc-4.2.1/lib64:
/.../intel/mkl/10.0.011/lib/em64t:/usr/X11R6/lib64:
/.../tcl-8.4.2/i386_rh72/lib:/.../XFree86-4.2.1/i386_rh72/lib}

(... are the various local paths to the objects of interest)

Hope that helps (maybe more than my other post)
MJR