[R] compiling r with icc
Henrik Schmiediche
henrik at stat.tamu.edu
Wed Mar 9 17:57:42 CET 2011
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.
- Henrik
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.
More information about the R-help
mailing list