[Rd] [R] R with MKL

Martyn Plummer plummer at iarc.fr
Tue Mar 17 10:39:35 CET 2009


On Tue, 2009-03-17 at 12:12 +0900, Ei-ji Nakama 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.
> 
> Do you use gcc and gfortran?
> 
> > 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"
> 
> cited reference https://svn.r-project.org/R/trunk/doc/manual/R-admin.texi
> | You are strongly encouraged to read the MKL User's Guide
> | <snip>
> | @example
> | MKL="   -L$@{MKL_LIB_PATH@}                               \
> |         -Wl,--start-group                               \
> |                 $@{MKL_LIB_PATH@}/libmkl_gf_lp64.a        \
> |                 $@{MKL_LIB_PATH@}/libmkl_gnu_thread.a     \
> |                 $@{MKL_LIB_PATH@}/libmkl_core.a           \
> |         -Wl,--end-group                                 \
> |         -liomp5 -lpthread"
> | @end example
> 
> However, It is a little different.( -lgomp and configure line)
> 
> MKL="   -L$@{MKL_LIB_PATH@}                               \
>         -Wl,--start-group                               \
>                 $@{MKL_LIB_PATH@}/libmkl_gf_lp64.a        \
>                 $@{MKL_LIB_PATH@}/libmkl_gnu_thread.a     \
>                 $@{MKL_LIB_PATH@}/libmkl_core.a           \
>         -Wl,--end-group                                 \
>         -lgomp -lpthread"
> ./configure --with-blas="$MKL" --with-lapack="$MKL"

Yes I see. If you are statically linking to MKL, you want to link to the
GNU OMP runtime for portability. Sorry about that.

> > 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.
> 
> Please note the thing that ABI of fortran is different with Intel compiler
> and GNU compiler.
> difficult to detect the mistake.

-----------------------------------------------------------------------
This message and its attachments are strictly confidenti...{{dropped:8}}



More information about the R-devel mailing list