[R] Building R for better performance

ce zadig_1 at excite.com
Thu Mar 6 03:54:06 CET 2014


Hi Jonathan,

I think most people would be interested in such a tool, because main complaint of R is its slowness for some operations and big data.
Even thought the intel software is paying , I could install it free since I am not selling any software and work for non-profit. 
I compiled successfully on my opensuse.. My question is : after make install , do I need to give special options to install.packages or they will be complied with icc automatically ?

Regards
CE


-----Original Message-----
From: "Anspach, Jonathan P" [jonathan.p.anspach at intel.com]
Date: 03/05/2014 12:28 AM
To: "r-help at r-project.org" <r-help at r-project.org>
Subject: [R] Building R for better performance

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