Package Details: r-mkl 3.3.0-1

Git Clone URL: (read-only)
Package Base: r-mkl
Description: Language and environment for statistical computing and graphics, set up to use Intel's MKL by default.
Upstream URL:
Licenses: GPL
Conflicts: r
Provides: r=3.3.0,r-mkl=3.3.0
Submitter: giniu
Maintainer: alexanderp
Last Packager: alexanderp
Votes: 14
Popularity: 1.120925
First Submitted: 2010-05-06 00:10
Last Updated: 2016-05-03 21:58

Required by (70)

Sources (4)

Latest Comments

syne commented on 2016-05-17 13:39

if you're installing intel-mkl etc, edit the PKGBUILD line 299-300 from
ln -s ./${_composer_xe_dir} composerxe-${_year}
ln -s ./composerxe-${_year} composerxe
ln -s ./${_composer_xe_dir} composerxe

don't even know why that second symlink is necessary... that fixed the mklvars problem for me.

alexanderp commented on 2016-05-16 22:04

Hmm I cannot seem to be able to reproduce your error.
Is present on your system?

jabranham commented on 2016-05-16 21:17

I get an error when this tries to install. It complains that:

/opt/intel/mkl/bin/ No such file or directory

alexanderp commented on 2016-05-04 12:55

Warning: The newest version of the Intel Composer XE 2016 (update 3) breaks compatibility when using the Intel compilers (icc + ifort). With GCC and GFortran it compiles fine.

alexanderp commented on 2016-02-04 23:59

Hi tetonedge and adalardo.

I've fixed the url error.

I've also fixed the compilation with gcc to correctly use the MKL now and disabled the shared BLAS lib to speed up R. As a consequence, external libraries will need to be recompiled.

Additionally, OpenMP is now enabled by default for both icc and gcc (using Intel's libiomp5.)

On my laptop (i7-2640m), I get the following benchmark scores using :

* R 3.2.3 + intel-mkl-2016_update1 + r-mkl (icc/ifort)
Total time for all 15 tests_________________________ (sec): 6.072
Overall mean (sum of I, II and III trimmed means/3)_ (sec): 0.387

* R 3.2.3 + intel-mkl-2016_update1 + r-mkl (gcc/gfortran)
Total time for all 15 tests_________________________ (sec): 6.309
Overall mean (sum of I, II and III trimmed means/3)_ (sec): 0.405

adalardo commented on 2016-02-03 19:52

Thank for the package alexanderp!
I found an error in PKGBUILD, to fix it just change line:




This is the bug commented by tetonedge.

I was not able to compile the package using icc. I comment the line:

#_CC="icc" # comment to build without the Intel compiler

and works!

tetonedge commented on 2016-02-01 14:20

I get ==> ERROR: url should not be an array
with the new PKGBUILD

alexanderp commented on 2016-01-20 20:59

I updated the PKGBUILD for R-3.2.3. The compilation uses Intel's MKL by default now, unless if commented out in the PKGBUILD.

I also added OpenMP support when compiling with gcc.

alexanderp commented on 2015-12-20 15:30

Hi. I had trouble compiling with the Intel compilers since some old and non-optimized options were used in your PKGBUILD. Here is a patch which fixes the PKGBUILD and compiles with Intel MKL, Intel BLAS (multi-threaded) and compiler optimizations:

diff --git a/PKGBUILD b/PKGBUILD
index c50e724..a7934a6 100644
@@ -15,7 +15,7 @@ conflicts=('r')
depends=('intel-mkl' 'bzip2' 'libpng' 'libjpeg' 'libtiff'
'ncurses' 'pcre' 'readline' 'zlib' 'perl' 'gcc-libs'
'libxt' 'libxmu' 'pango' 'xz' 'desktop-file-utils' 'zip' 'unzip')
-makedepends=('jdk8-openjdk' 'gcc-fortran' 'tk')
+makedepends=('jdk8-openjdk-infinality' 'gcc-fortran' 'tk')
optdepends=('tk: tcl/tk interface' 'texlive-bin: latex sty files'
'icc: intel compiler' 'icpc: intel compiler' 'xiar: intel compiler'
'xild: intel compiler')
@@ -39,13 +39,13 @@ sha512sums=('71ba470875262b9f00fb6970f209788df4dad30e0a28373b824b60d8bc6401afb77

if [ "$CARCH" == "x86_64" ]; then
- _intel_lib=mkl_gf_lp64
+ _intel_lib=mkl_intel_lp64
elif [ "$CARCH" == "i686" ]; then

-#_CC="icc" # uncomment to build with the Intel compiler
+_CC="icc" # uncomment to build with the Intel compiler

prepare() {
cd R-${pkgver}
@@ -60,10 +60,17 @@ prepare() {
build() {
# Set up the environment for MKL
source /opt/intel/mkl/bin/ ${_intel_arch}
+ source /opt/intel/composerxe/linux/bin/ ${_intel_arch}
_icclibpath=$(echo $MKLROOT | sed "s%mkl%compiler%g")/lib/${_intel_arch}
- _mkllibs=" -fopenmp -Wl,--no-as-needed -L${_mkllibpath} -l${_intel_lib} -lmkl_core -lmkl_gnu_thread -ldl -lpthread -lm"
+ _openmplibpath=${PROD_DIR}/compiler/lib/intel64
+ _mkllibs="-L${_mkllibpath} -L${_openmplibpath} -Wl,--no-as-needed \
+ -l${_intel_lib} \
+ -lmkl_intel_thread \
+ -lmkl_core \
+ -liomp5 -ldl -lpthread -lm"
LDFLAGS="${LDFLAGS} -L${_icclibpath}"
+ export MAIN_LDFLAGS="-qopenmp"

if [ $_CC = "icc" ]; then
@@ -73,6 +80,10 @@ build() {
export LD="xild"
export _F77="ifort"
export _FC="ifort"
+ export CFLAGS="-O3 -ipo -qopenmp -parallel -xHost -fp-model strict -qopt-mem-layout-trans=3 -I${MKLROOT}/include"
+ export CXXFLAGS="-O3 -ipo -qopenmp -parallel -xHost -fp-model strict -qopt-mem-layout-trans=3 -I${MKLROOT}/include"
+ export FFLAGS="-O3 -ipo -qopenmp -parallel -xHost -fp-model strict -qopt-mem-layout-trans=3 -I${MKLROOT}/include"
+ export FCFLAGS="-O3 -ipo -qopenmp -parallel -xHost -fp-model strict -qopt-mem-layout-trans=3 -I${MKLROOT}/include"
export _F77="gfortran"
export _FC="gfortran"
@@ -87,11 +98,14 @@ build() {
rincludedir=/usr/include/R/ \
rdocdir=/usr/share/doc/R/ \
--with-x \
- --enable-R-shlib \
- --with-blas="${_mkllibs}" \
- --with-lapack \
- F77=${_F77} \
- FC=${_FC} \
+ --with-blas="${_mkllibs}" \
+ --with-lapack \
+ --enable-R-shlib \
+ --enable-memory-profiling \
+ --enable-BLAS-shlib \
+ --enable-openmp \
+ F77=${_F77} \
+ FC=${_FC} \

# Place Intel's basic math library prior to GLIBC libm

jdarch commented on 2015-09-08 11:54

gabx, Intel's basic math library contains an performance-optimized subset of libm. By linking to it before linking to libm some operations might have slightly higher performance, as the call will then be handled by Intel's library. AMD has a similar library:

All comments