Package Details: r-mkl 3.6.2-3

Git Clone URL: https://aur.archlinux.org/r-mkl.git (read-only, click to copy)
Package Base: r-mkl
Description: Language and environment for statistical computing and graphics, linked to the Intel(R) MKL.
Upstream URL: http://www.r-project.org/
Keywords: hpc mathematics modelling r statistics
Licenses: GPL
Conflicts: microsoft-r-open, r
Provides: r=3.6.2
Submitter: giniu
Maintainer: alexanderp
Last Packager: alexanderp
Votes: 19
Popularity: 0.111477
First Submitted: 2010-05-06 00:10
Last Updated: 2020-02-16 21:13

Dependencies (25)

Required by (274)

Sources (4)

Pinned Comments

alexanderp commented on 2020-02-17 18:36

@laborat, the recent (two days old) community/intel-mkl package lacks a lot of content from the split package.

Please keep on using aur/intel-mkl as part of aur/intel-parallel-studio-xe until the relevant scripts are ported to community.

Also, as a general note, those with Ryzen processors could obtain even better performance by setting an environment variable. Please see https://www.reddit.com/r/MachineLearning/comments/f2pbvz/discussion_workaround_for_mkl_on_amd/

Latest Comments

« First ‹ Previous ... 7 8 9 10 11 12 13 14 15 16 17 Next › Last »

nacnudus commented on 2016-06-02 14:00

Installation stalls on package mgcv with the following:

checking package 'mgcv'
* using log directory ‘/tmp/yaourt-tmp-nacnudus/aur-r-mkl/src/R-3.3.0/tests/mgcv.Rcheck’
* using R version 3.3.0 (2016-05-03)
* using platform: x86_64-pc-linux-gnu (64-bit)
* using session charset: UTF-8
* checking for file ‘mgcv/DESCRIPTION’ ... OK
* this is package ‘mgcv’ version ‘1.8-12’
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* skipping installation test
* checking installed package size ... OK
* checking package directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... NOTE
Package unavailable to check Rd xrefs: ‘gam’
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking contents of ‘data’ directory ... OK
* checking data for non-ASCII characters ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking line endings in C/C++/Fortran sources/headers ... OK
* checking line endings in Makefiles ... OK
* checking compilation flags in Makevars ... OK
* checking for GNU extensions in Makefiles ... OK
* checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
* checking compiled code ... NOTE
Note: information on .o files is not available
* checking examples ...^C ERROR
Running examples in ‘mgcv-Ex.R’ failed
The error most likely occurred in:

> ### Name: mgcv.parallel
> ### Title: Parallel computation in mgcv.
> ### Aliases: mgcv.parallel
> ### Keywords: package models smooth regression
>
> ### ** Examples
>
> ## illustration of multi-threading with gam...
>
> require(mgcv);set.seed(9)
> dat <- gamSim(1,n=2000,dist="poisson",scale=.1)
Gu & Wahba 4 term additive model
> k <- 12;bs <- "cr";ctrl <- list(nthreads=2)
>
> system.time(b1<-gam(y~s(x0,bs=bs)+s(x1,bs=bs)+s(x2,bs=bs,k=k)
+ ,family=poisson,data=dat,method="REML"))[3]
elapsed
0.088
>
> system.time(b2<-gam(y~s(x0,bs=bs)+s(x1,bs=bs)+s(x2,bs=bs,k=k),
+ family=poisson,data=dat,method="REML",control=ctrl))[3]


Then hundreds of lines of:

OpenBLAS Warning : Detect OpenMP Loop and this application may hang. Please rebuild the library with USE_OPENMP=1 option.

Finally:

elapsed
5.795
>
> ## Poisson example on a cluster with 'bam'.
> ## Note that there is some overhead in initializing the
> ## computation on the cluster, associated with loading
> ## the Matrix package on each node. For this reason the
> ## sample sizes here are very small to keep CRAN happy, but at
> ## this low sample size you see little advantage of parallel computation.
>
> k <- 13
> dat <- gamSim(1,n=6000,dist="poisson",scale=.1)
Gu & Wahba 4 term additive model
> require(parallel)
Loading required package: parallel
> nc <- 2 ## cluster size, set for example portability
> if (detectCores()>1) { ## no point otherwise
+ cl <- makeCluster(nc)
+ ## could also use makeForkCluster, but read warnings first!
+ } else cl <- NULL

Execution halted
* checking PDF version of manual ... OK
* DONE

Status: 1 ERROR, 2 NOTEs
See
‘/tmp/yaourt-tmp-nacnudus/aur-r-mkl/src/R-3.3.0/tests/mgcv.Rcheck/00check.log’
for details.


Makefile.common:404: recipe for target 'test-Packages-Recommended' failed
make[1]: *** [test-Packages-Recommended] Interrupt
Makefile:239: recipe for target 'check-recommended' failed
make: *** [check-recommended] Interrupt

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
to
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 mklvars.sh present on your system?

Anonymous comment on 2016-05-16 21:17

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

/opt/intel/mkl/bin/mklvars.sh: 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 http://r.research.att.com/benchmarks/R-benchmark-25.R :

* 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:

url=('http://www.r-project.org/')

to

url="http://www.r-project.org/"

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!
Best,
Alexandre

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
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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_arch=intel64
- _intel_lib=mkl_gf_lp64
+ _intel_lib=mkl_intel_lp64
elif [ "$CARCH" == "i686" ]; then
_intel_arch=ia32
_intel_lib=mkl_gf
fi

-#_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/mklvars.sh ${_intel_arch}
+ source /opt/intel/composerxe/linux/bin/ifortvars.sh ${_intel_arch}
_icclibpath=$(echo $MKLROOT | sed "s%mkl%compiler%g")/lib/${_intel_arch}
_mkllibpath=$MKLROOT/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"
else
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} \
LIBnn=lib

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