[Rd] Problem building R with Intel MKL v10 BLAS

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Jan 25 19:25:42 CET 2008


On Fri, 25 Jan 2008, Michael Braun wrote:

> Thanks for everyone's help.  Unfortunately, still no success.  So I took the 
> alternate route suggested in section A.3.1.5 of R-admin, and just created a 
> symbolic link from libRblas.so to .../libmkl_gf_lp64.so.  I can still 
> multiply 2 matrices together in R, so it looks like this is working.  Can you 
> propose any other test to be sure?

Run 'make check' ... it includes some tests specifically for working 
BLAS.

>
> Should I make a similar link for LAPACK?
>
> I'm still perplexed as to why configure couldn't find the MKL BLAS, but I 
> suppose any solution that works is a good one.
>
> Thanks again.
>
> Michael
>
>
>
>
> Hin-Tak Leung wrote:
>> This part "-lmkl_gf_lp64.so -lmkl_gnu_thread.so -lmkl_core.so"
>> looks wrong - it should be "-lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core"
>> without the ".so" part.
>> 
>> I don't know how BLAS_LIBS does it, but when I was linking against
>> mkl 9, all I did which different from the usual build (diff from the
>> two rpm spec file I wrote) was 3 changes:
>> 
>> export LDFLAGS=...  -L/opt/intel/mkl/9.1/lib/em64t/
>> export FFLAGS=... -ff2c
>> ./configure ... --with-blas="-lmkl -lguide -lpthread"
>> 
>> The FFLAGS ezport was needed because of difference between g77 and 
>> gfortran.
>> 
>> 
>> Michael Braun wrote:
>>> NO
>>> 
>>> Hi.  I'm not sure if this is an R-help or R-devel problem, so I'm starting 
>>> here in the hope that someone can help (and willing to go to the other 
>>> list if it's more appropriate).  I think I am following all of the 
>>> instructions in the various manuals, but clearly I am missing something.
>>> 
>>> I have an Intel EM64T Dell with 2 dual-core Xeon processors running Red 
>>> Hat EL5.  I would like to build R 2.6.1 with lots of debugging and 
>>> profiling options, and link it to the processor-specific Intel MKL blas. 
>>> The problem is that after I compile R, and do R CMD config BLAS_LIBS, the 
>>> response is
>>> -L/usr/local/lib64/R/lib -lRblas.
>>> 
>>> This tells me that R is not linked to the Intel BLAS at all.
>>> 
>>> My config.site file for R is:
>>> 
>>> #! /bin/sh
>>> 
>>> R_PAPERSIZE=letter
>>> CFLAGS="-g -O2 -p -pg"
>>> CPPFLAGS="-I/opt/intel/mkl/10.0.1.014/include -I/usr/include 
>>> -I/usr/local/include"
>>> LIBnn=lib64
>>> BLAS_LIBS="-L/opt/intel/mkl/10.0.1.014/lib/em64t -Wl,--start-group 
>>> -lmkl_gf_lp64.so -lmkl_gnu_thread.so -lmkl_core.so -l -l -l -Wl, 
>>> --end-group -lguide -lpthread -lm"
>>> 
>>> I have set the CONFIG_SITE environment variable to the location of the 
>>> config.site.file.
>>> I am doing everything as superuser.
>>> 
>>> The command I am using for configure is
>>> 
>>> ./configure --disable-R-profiling --with-blas=no
>>> 
>>> following the instructions in the R-admin file regarding enabling C-level 
>>> profiling and linking to the external BLAS libraries referenced in the 
>>> config.site file.
>>> 
>>> The BLAS_LIBS files are different than in the R-admin manual because of 
>>> changes in the Intel MKL for version 10.  These libraries, in this order, 
>>> were taken from the Intel MKL for Linux User's Guide, chapter 5.
>>> 
>>> So, still no luck linking to the optimized BLAS.  I'd appreciate any 
>>> suggestions.
>>> 
>>> Thanks,
>>> 
>>> Michael
>>> 
>>> 
>>> 
>>> 
>>> 
>> 
>
>
> -- 
> Michael Braun
> Assistant Professor of Marketing
> MIT Sloan School of Management
> One Amherst St., E40-169
> Cambridge, MA 02142
> USA
>
> braunm at mit.edu
> +1 (617) 253-3436
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-devel mailing list