Package Details: r-mkl 4.4.2-1

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
Submitter: giniu
Maintainer: alexanderp
Last Packager: alexanderp
Votes: 25
Popularity: 0.000077
First Submitted: 2010-05-06 00:10 (UTC)
Last Updated: 2024-11-12 19:56 (UTC)

Required by (3402)

Sources (5)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 9 10 11 12 .. 21 Next › Last »

blazko commented on 2019-05-17 11:40 (UTC)

@alexanderp I sorted this out. For a 4 cores 8 threads CPU I should set export MKL_NUM_THREADS=32 on my laptop (instead of 8) and export MKL_NUM_THREADS=128 on the xeon (instead of 32),

After this they all work at max speeds and resources.

alexanderp commented on 2019-05-07 10:59 (UTC)

@blazko, Not sure... It seems that the way GNU OpenMP utilizes cores/threads is different. Just for reference, I am getting the same behaviour when using the microsoft-r-open package.

blazko commented on 2019-05-07 08:49 (UTC)

@alexanderp thanks for your tests - i'm running a bigger batch of those sims right now, and I would avoid stopping them.

Your test clearly shows, that performancewise OpenMP is better. Is there a reason we can't run that on 100%?

alexanderp commented on 2019-05-06 20:15 (UTC)

@blazko, I modified your code as such:

library(simr)
dataf <- read.csv("Rdataframe.csv", stringsAsFactors = F)
ns = 500
ss<-1
m1 <- lmer(scc ~ naC + (naC|subj), dataf)
summary(m1)
fixef(m1)["naC"] <- -0.15
set.seed(ss)
system.time(
  p1 <- powerCurve(m1, along="subj", nsim=100, breaks = seq(20, 100, 20))
)

These were the results:

R 3.5.3 with Intel threading:

  • all cores 100% in top
  • user 1015.352, system 73.983, elapsed 206.349

R 3.6.0 with GNU OpenMP:

  • half of the cores active in top
  • user 245.528, system 3.107, elapsed 181.824

Please run this on your side as well and report back.

alexanderp commented on 2019-05-06 19:57 (UTC)

@mys_721tx, I've never had to source mklvars.sh manually, since it's loaded by profile.d on login.

mys_721tx commented on 2019-05-06 19:36 (UTC)

@alexanderpLD_LIBRARY_PATH and LIBRARY_PATH are not captured in Makeconf. Therefore /opt/intel/mkl/bin/mklvars.sh must be sourced before building any package that uses limf.

alexanderp commented on 2019-05-06 19:02 (UTC) (edited on 2019-05-06 19:02 (UTC) by alexanderp)

@mys_721tx,

mys_721tx commented on 2019-05-06 18:51 (UTC)

@alexanderp Could you post your Makeconf?

# etc/Makeconf.  Generated from Makeconf.in by configure.
#
# ${R_HOME}/etc/Makeconf
#
# R was configured using the following call
# (not including env. vars and site configuration)
# configure  '--prefix=/usr' '--libdir=/usr/lib' '--sysconfdir=/etc/R' '--datarootdir=/usr/share' 'rsharedir=/usr/share/R/' 'rincludedir=/usr/include/R/' 'rdocdir=/usr/share/doc/R/' '--with-x' '--with-blas= -L/opt/intel/compilers_and_libraries_2019.3.199/linux/mkl/lib/intel64       -Wl,--no-as-needed       -lmkl_gf_lp64       -lmkl_gnu_thread       -lmkl_core       -lgomp       -lpthread       -limf -lm       -ldl' '--with-lapack' '--enable-R-shlib' 'LIBnn=lib' 'PKG_CONFIG_PATH=/opt/intel/compilers_and_libraries_2019.3.199/linux/mkl/bin/pkgconfig' 'CC=gcc' 'CFLAGS= -m64 -I/opt/intel/compilers_and_libraries_2019.3.199/linux/mkl/include -march=x86-64 -mtune=generic -O2 -pipe -fno-plt' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now' 'CPPFLAGS=-D_FORTIFY_SOURCE=2' 'FC=gfortran' 'FCFLAGS= -m64 -I/opt/intel/compilers_and_libraries_2019.3.199/linux/mkl/include ' 'CXX=g++' 'CXXFLAGS= -m64 -I/opt/intel/compilers_and_libraries_2019.3.199/linux/mkl/include -march=x86-64 -mtune=generic -O2 -pipe -fno-plt'

## This fails if it contains spaces, or if it is quoted
include $(R_SHARE_DIR)/make/vars.mk

AR = ar
BLAS_LIBS =  -L/opt/intel/compilers_and_libraries_2019.3.199/linux/mkl/lib/intel64       -Wl,--no-as-needed       -lmkl_gf_lp64       -lmkl_gnu_thread       -lmkl_core       -lgomp       -lpthread       -limf -lm       -ldl
C_VISIBILITY = -fvisibility=hidden
CC = gcc
CFLAGS =  -m64 -I/opt/intel/compilers_and_libraries_2019.3.199/linux/mkl/include -march=x86-64 -mtune=generic -O2 -pipe -fno-plt $(LTO)
CPICFLAGS = -fpic
CPPFLAGS = -D_FORTIFY_SOURCE=2
CXX = g++ -std=gnu++11
CXXCPP = $(CXX) -E
CXXFLAGS =  -m64 -I/opt/intel/compilers_and_libraries_2019.3.199/linux/mkl/include -march=x86-64 -mtune=generic -O2 -pipe -fno-plt $(LTO)
CXXPICFLAGS = -fpic
CXX98 = g++
CXX98FLAGS =  -m64 -I/opt/intel/compilers_and_libraries_2019.3.199/linux/mkl/include -march=x86-64 -mtune=generic -O2 -pipe -fno-plt $(LTO)
CXX98PICFLAGS = -fpic
CXX98STD = -std=gnu++98
CXX11 = g++
CXX11FLAGS =  -m64 -I/opt/intel/compilers_and_libraries_2019.3.199/linux/mkl/include -march=x86-64 -mtune=generic -O2 -pipe -fno-plt $(LTO)
CXX11PICFLAGS = -fpic
CXX11STD = -std=gnu++11
CXX14 = g++
CXX14FLAGS =  -m64 -I/opt/intel/compilers_and_libraries_2019.3.199/linux/mkl/include -march=x86-64 -mtune=generic -O2 -pipe -fno-plt $(LTO)
CXX14PICFLAGS = -fpic
CXX14STD = -std=gnu++14
CXX17 = g++
CXX17FLAGS =  -m64 -I/opt/intel/compilers_and_libraries_2019.3.199/linux/mkl/include -march=x86-64 -mtune=generic -O2 -pipe -fno-plt $(LTO)
CXX17PICFLAGS = -fpic
CXX17STD = -std=gnu++17
CXX_VISIBILITY = -fvisibility=hidden
DYLIB_EXT = .so
DYLIB_LD = $(CC)
DYLIB_LDFLAGS = -shared -fopenmp# $(CFLAGS) $(CPICFLAGS)
DYLIB_LINK = $(DYLIB_LD) $(DYLIB_LDFLAGS) $(LDFLAGS)
ECHO = echo
ECHO_C = 
ECHO_N = -n
ECHO_T = 
F_VISIBILITY = -fvisibility=hidden
## FC is the compiler used for all Fortran as from R 3.6.0
FC = gfortran
FCFLAGS =  -m64 -I/opt/intel/compilers_and_libraries_2019.3.199/linux/mkl/include  $(LTO)
## additional libs needed when linking with $(FC), e.g. on some Oracle compilers
FCLIBS_XTRA = 
FFLAGS =  -m64 -I/opt/intel/compilers_and_libraries_2019.3.199/linux/mkl/include  $(LTO)
FLIBS =  -lgfortran -limf -lm -lquadmath
FPICFLAGS = -fpic
FOUNDATION_CPPFLAGS = 
FOUNDATION_LIBS = 
JAR = /usr/bin/jar
JAVA = /usr/bin/java
JAVAC = /usr/bin/javac
JAVAH = /usr/bin/javah
## JAVA_HOME might be used in the next three.  
## They are for packages 'JavaGD' and 'rJava'
JAVA_HOME = /usr/lib/jvm/java-8-openjdk/jre
JAVA_CPPFLAGS = -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/linux
JAVA_LIBS = -L$(JAVA_HOME)/lib/amd64/server -ljvm
JAVA_LD_LIBRARY_PATH = $(JAVA_HOME)/lib/amd64/server
LAPACK_LIBS = 
LDFLAGS = -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now
## we only need this is if it is external, as otherwise link to R
LIBINTL= 
LIBM = -limf -lm
LIBR0 = -L"$(R_HOME)/lib$(R_ARCH)"
LIBR1 = -lR
LIBR = -L"$(R_HOME)/lib$(R_ARCH)" -lR
LIBS =  -lpcre2-8 -lpcre -llzma -lbz2 -lz -ltirpc -lrt -ldl -limf -lm -licuuc -licui18n
## needed by R CMD config
LIBnn = lib
LIBTOOL = $(SHELL) "$(R_HOME)/bin/libtool"
LTO = 
## needed to build applications linking to static libR
MAIN_LD = $(CC)
MAIN_LDFLAGS = -Wl,--export-dynamic -fopenmp
MAIN_LINK = $(MAIN_LD) $(MAIN_LDFLAGS) $(LDFLAGS)
MKINSTALLDIRS = "$(R_HOME)/bin/mkinstalldirs"
OBJC = gcc
OBJCFLAGS = -g -O2 -fobjc-exceptions $(LTO)
OBJC_LIBS = -lobjc 
OBJCXX = g++
R_ARCH = 
RANLIB = ranlib
SAFE_FFLAGS =  -m64 -I/opt/intel/compilers_and_libraries_2019.3.199/linux/mkl/include  -msse2 -mfpmath=sse
SED = /usr/bin/sed
SHELL = /bin/sh
SHLIB_CFLAGS = 
SHLIB_CXXFLAGS = 
SHLIB_CXXLD = $(CXX)
SHLIB_CXXLDFLAGS = -shared
SHLIB_CXX98LD = $(CXX98) $(CXX98STD)
SHLIB_CXX98LDFLAGS = -shared
SHLIB_CXX11LD = $(CXX11) $(CXX11STD)
SHLIB_CXX11LDFLAGS = -shared
SHLIB_CXX14LD = $(CXX14) $(CXX14STD)
SHLIB_CXX14LDFLAGS = -shared
SHLIB_CXX17LD = $(CXX17) $(CXX17STD)
SHLIB_CXX17LDFLAGS = -shared
SHLIB_EXT = .so
SHLIB_FFLAGS = 
SHLIB_LD = $(CC)
SHLIB_LDFLAGS = -shared# $(CFLAGS) $(CPICFLAGS)
SHLIB_LIBADD = 
## We want to ensure libR is picked up from $(R_HOME)/lib
## before e.g. /usr/local/lib if a version is already installed.
SHLIB_LINK = $(SHLIB_LD) $(SHLIB_LDFLAGS) $(LIBR0) $(LDFLAGS)
SHLIB_OPENMP_CFLAGS = -fopenmp
SHLIB_OPENMP_CXXFLAGS = -fopenmp
SHLIB_OPENMP_FFLAGS = -fopenmp
STRIP_STATIC_LIB = strip --strip-debug
STRIP_SHARED_LIB = strip --strip-unneeded
TCLTK_CPPFLAGS = -I/usr/include -I/usr/include 
TCLTK_LIBS = -L/usr/lib -ltcl8.6 -L/usr/lib -ltk8.6 -lX11 -lXss -lXext
YACC = bison -y

## Legacy settings:  no longer used by R as of 3.6.0
## Setting FC often sets F77 (on Solaris make even if set)
## so must follow FC in this file.
F77 = gfortran
FCPICFLAGS = -fpic
F77_VISIBILITY = -fvisibility=hidden
SHLIB_FCLD = $(FC)
SHLIB_FCLDFLAGS = -shared
SHLIB_OPENMP_FCFLAGS = -fopenmp


## for linking to libR.a
STATIC_LIBR = # -Wl,--whole-archive "$(R_HOME)/lib$(R_ARCH)/libR.a" -Wl,--no-whole-archive $(BLAS_LIBS) $(FLIBS)  $(LIBINTL) -lreadline  $(LIBS)

## These are recorded as macros for legacy use in packages
## set on AIX, formerly for old glibc (-D__NO_MATH_INLINES)
R_XTRA_CFLAGS = 
##  was formerly set on HP-UX
R_XTRA_CPPFLAGS =  -I"$(R_INCLUDE_DIR)" -DNDEBUG
## currently unset
R_XTRA_CXXFLAGS = 
## currently unset
R_XTRA_FFLAGS = 

## SHLIB_CFLAGS SHLIB_CXXFLAGS SHLIB_FFLAGS are apparently currently unused
## SHLIB_CXXFLAGS is undocumented, there is no SHLIB_FCFLAGS
ALL_CFLAGS =  $(PKG_CFLAGS) $(CPICFLAGS) $(SHLIB_CFLAGS) $(CFLAGS)
ALL_CPPFLAGS =  -I"$(R_INCLUDE_DIR)" -DNDEBUG $(PKG_CPPFLAGS) $(CLINK_CPPFLAGS) $(CPPFLAGS)
ALL_CXXFLAGS =  $(PKG_CXXFLAGS) $(CXXPICFLAGS) $(SHLIB_CXXFLAGS) $(CXXFLAGS)
ALL_OBJCFLAGS = $(PKG_OBJCFLAGS) $(CPICFLAGS) $(SHLIB_CFLAGS) $(OBJCFLAGS)
ALL_OBJCXXFLAGS = $(PKG_OBJCXXFLAGS) $(CXXPICFLAGS) $(SHLIB_CXXFLAGS) $(OBJCXXFLAGS)
ALL_FFLAGS =  $(PKG_FFLAGS) $(FPICFLAGS) $(SHLIB_FFLAGS) $(FFLAGS)
## can be overridden by R CMD SHLIB
P_FCFLAGS = $(PKG_FFLAGS)
ALL_FCFLAGS =  $(P_FCFLAGS) $(FPICFLAGS) $(SHLIB_FFLAGS) $(FCFLAGS)
## LIBR here as a couple of packages use this without SHLIB_LINK
ALL_LIBS = $(PKG_LIBS) $(SHLIB_LIBADD) $(LIBR)# $(LIBINTL)

.SUFFIXES:
.SUFFIXES: .c .cc .cpp .d .f .f90 .f95 .m .mm .M .o

.c.o:
    $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c $< -o $@
.c.d:
    @echo "making $@ from $<"
    @$(CC) -MM $(ALL_CPPFLAGS) $< > $@
.cc.o:
    $(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) -c $< -o $@
.cpp.o:
    $(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) -c $< -o $@
.cc.d:
    @echo "making $@ from $<"
    @$(CXX) -M $(ALL_CPPFLAGS) $< > $@
.cpp.d:
    @echo "making $@ from $<"
    @$(CXX) -M $(ALL_CPPFLAGS) $< > $@
.m.o:
    $(OBJC) $(ALL_CPPFLAGS) $(ALL_OBJCFLAGS) -c $< -o $@
.m.d:
    @echo "making $@ from $<"
    @gcc -MM $(ALL_CPPFLAGS) $< > $@
.mm.o:
    $(OBJCXX) $(ALL_CPPFLAGS) $(ALL_OBJCXXFLAGS) -c $< -o $@
.M.o:
    $(OBJCXX) $(ALL_CPPFLAGS) $(ALL_OBJCXXFLAGS) -c $< -o $@
.f.o:
    $(FC) $(ALL_FFLAGS) -c $< -o $@
## @FCFLAGS_f9x@ are flags needed to recognise the extensions
.f95.o:
    $(FC) $(ALL_FCFLAGS) -c  $< -o $@
.f90.o:
    $(FC) $(ALL_FCFLAGS) -c  $< -o $@

blazko commented on 2019-05-06 18:49 (UTC)

@alexenderp this is the code I'm running:

https://gist.github.com/b1azk0/db5f37da66b28ecbb1c0b40b68177702

I did this simulation on previous R version and it was just fine.

alexanderp commented on 2019-05-06 18:46 (UTC)

@mys_721tx, acepack installs fine on my side:

> install.packages("acepack")
trying URL 'https://cran.rstudio.com/src/contrib/acepack_1.4.1.tar.gz'
Content type 'application/x-gzip' length 34848 bytes (34 KB)
==================================================
downloaded 34 KB

* installing *source* package ‘acepack’ ...
** package ‘acepack’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gfortran  -fpic  -m64 -I/opt/intel/compilers_and_libraries_2019.3.199/linux/mkl/include   -c ace.f -o ace.o
gfortran  -fpic  -m64 -I/opt/intel/compilers_and_libraries_2019.3.199/linux/mkl/include   -c avas.f -o avas.o
gfortran  -fpic  -m64 -I/opt/intel/compilers_and_libraries_2019.3.199/linux/mkl/include   -c rlsmo.f -o rlsmo.o
gcc -shared -L/usr/lib64/R/lib -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -o acepack.so ace.o avas.o rlsmo.o -lgfortran -limf -lm -lquadmath -L/usr/lib64/R/lib -lR
installing to /home/user/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-acepack/00new/acepack/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (acepack)

The downloaded source packages are in
    ‘/tmp/RtmpTd0Kjm/downloaded_packages’
>