Re: [R] compiling r with icc

From: Henrik Schmiediche <henrik_at_stat.tamu.edu>
Date: Wed, 09 Mar 2011 10:57:42 -0600

The compiler/optimization flags I use (or am experimenting with are) for the Linux 64bit Intel XE compilers and R-2.12.2 are:

     -O3 -ipo -msse3 -fp-model precise

     export AR=xiar                          # not needed when using -ip 
instead of -ipo
     #export MAIN_LDFLAGS="-limf -lpthread"  # only needed with using 
--enable-R-shlib
./configure ...

Instead of "-msse3" you can use "-xHOST" if you have an Intel CPU and know the R code only needs to work on one type of system. The "-ipo" invokes Intel multi-file inter-procedural optimizations and you will need to use the Intel 'xiar' program for it to work. Alternatively use '-ip' instead of '-ipo' for single file inter-procedural optimization.

I also need to define the MAIN_LDFLAGS for linking to work properly when using --enable-R-shlib (though I have not seen any of the guides mention this).

If the compile time warning messages bother you:

   -O3 -ipo -msse3 -fp-model precise -diag-disable 170,186,188

Let me know if it works for you.

On 3/7/11 6:34 PM, Mag Gam wrote:
> I am using, http://www.rd.dnc.ac.jp/~otsu/lecture/RwithMKL.html to
> compile R 2.10 . Everything compiles fine but I was wondering if there
> are any more optimizations I can do with the flags.

>

> ______________________________________________
> 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.


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. Received on Wed 09 Mar 2011 - 21:59:06 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 09 Mar 2011 - 22:10:20 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive