[R] Building R for better performance
peljasz at yahoo.co.uk
Mon Sep 1 13:25:01 CEST 2014
could you tell us if the same/similar performance benefits
we should expect when gnu complier suite + MKL are teamed up?
and how to configure such a compilation?
On 04/03/14 21:44, Anspach, Jonathan P wrote:
> I'm a software engineer with Intel. Recently I've been investigating R performance on Intel Xeon and Xeon Phi processors and RH Linux. I've also compared the performance of R built with the Intel compilers and Intel Math Kernel Library to a "default" build (no config options) that uses the GNU compilers. To my dismay, I've found that the GNU build always runs on a single CPU core, even during matrix operations. The Intel build runs matrix operations on multiple cores, so it is much faster on those operations. Running the benchmark-2.5 on a 24 core Xeon system, the Intel build is 13x faster than the GNU build (21 seconds vs 275 seconds). Unfortunately, this advantage is not documented anywhere that I can see.
> Building with the Intel tools is very easy. Assuming the tools are installed in /opt/intel/composerxe, the process is simply (in bash shell):
> $ . /opt/intel/composerxe/bin/compilervars.sh intel64
> $ ./configure --with-blas="-L/opt/intel/composerxe/mkl/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm" --with-lapack CC=icc CFLAGS=-O2 CXX=icpc CXXFLAGS=-O2 F77=ifort FFLAGS=-O2 FC=ifort FCFLAGS=-O2
> $ make
> $ make check
> My questions are:
> 1) Do most system admins and/or R installers know about this performance difference, and use the Intel tools to build R?
> 2) Can we add information on the advantage of building with the Intel tools, and how to do it, to the installation instructions and FAQ?
> I can post my data if anyone is interested.
> Jonathan Anspach
> Sr. Software Engineer
> Intel Corp.
> jonathan.p.anspach at intel.com
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help