[R] R with MKL

Martyn Plummer plummer at iarc.fr
Thu Mar 19 14:57:36 CET 2009


Both gcc and MKL are moving targets.  So if you are using a more recent
version of gcc than the one used to compile MKL then you are potentially
in trouble.

In this case, you still have the option of using Intel threads
(libmkl_intel_thread) instead of the GNU thread library. In this case
you must dynamically link to the Intel OpenMP runtime library libiomp5
instead of the GNU library libgomp.

Of course, this does not help if you want to make a portable version of
R, statically linked to MKL.

On Wed, 2009-03-18 at 21:17 +0900, Ei-ji Nakama wrote:
> Hi Cristián.
> 
> >> 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"
> >>
> > ...
> >
> > Thanks for all your answers. I read carefully the userguide and the
> > admin guide. I now understand that with gfortran I need to use
> > libmkl_gf_lp64 and libmkl_gnu_thread, either shared or static.
> > Unfortunately for MKL version 10.1.1.019, libmkl_gnu_thread links
> > against the symbol "_gfortran_internal_malloc64" which was present in
> > gcc-4.1 and is not present anymore in gcc-4.3.
> 
> However, the support  of openmp is gcc-4.2 or latter.
> 
> > So my alternatives are installing an older compiler, waiting for a
> > newer MKL version, building R with Intel compiler or switching away
> > from MKL.
> 
> Please download the following files, and test the procedure to which
> the file is written first.
> 
>       http://prs.ism.ac.jp/~nakama/mkl/mkl_gf.c
> 

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




More information about the R-help mailing list