[R] Building R for better performance

lejeczek peljasz at yahoo.co.uk
Mon Sep 1 23:24:44 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?
many thanks

On 04/03/14 21:44, Anspach, Jonathan P wrote:
> Greetings,
>
> 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.
>
> Thanks,
> Jonathan Anspach
> Sr. Software Engineer
> Intel Corp.
> jonathan.p.anspach at intel.com
> 713-751-9460
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> 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 mailing list