[R] compiling 2.6.2 using icc
Robert.Denham at nrw.qld.gov.au
Mon Feb 18 00:33:56 CET 2008
Just in case others make my mistake, the problem was that I had a .R
directory in my home directory, which had a Makevars file in it with
CC=gcc. I don't remember why I had this, but it was being read for
package building and throwing everything out.
From: Denham Robert
Sent: Thursday, 14 February 2008 2:06 PM
To: r-help at r-project.org
Cc: 'Prof Brian Ripley'
Subject: RE: [R] compiling 2.6.2 using icc
I thought the problem was that I had tried to use a --with-blas argument
as an option to the configure script like:
-lpthread -latlas" since I had built R with gcc like this in the past.
But it still doesn't seem to compile the packages. Here is the approach
I have taken, on a freshly untarred directory:
edit site.config so that it contains:
CFLAGS="-g -O3 -wd188 -ip"
LDFLAGS="-L$ICC_LIBS -L$IFC_LIBS -L/usr/lib64"
FCFLAGS="-g -O3 -mp"
Run configure like:
This results in:
R is now configured for x86_64-unknown-linux-gnu
Source directory: .
Installation directory: /opt/freeware/R/R-2.6.2/
C compiler: icc -c99 -mp -g -O3 -wd188 -ip
Fortran 77 compiler: ifort -mp -g -O3
C++ compiler: icpc -mp -g -O3
Fortran 90/95 compiler: ifort -g -O3 -mp
Obj-C compiler: gcc -g -O2
Interfaces supported: X11, tcltk
External libraries: readline
Additional capabilities: PNG, JPEG, iconv, MBCS, NLS
Options enabled: shared BLAS, R profiling, Java
Recommended packages: yes
Then make, which works until it gets to building the recommended package
begin installing recommended package VR
* Installing *source* package 'MASS' ...
make: Entering directory `/tmp/R.INSTALL.r19401/VR/MASS/src'
-I/opt/freewaresrc/R/R-2.6.2/include -I/usr/local/include -mp -fpic
-g -O3 -wd188 -ip -c lqs.c -o lqs.o
gcc: unrecognized option '-wd188'
cc1: error: unrecognized command line option "-ip"
cc1: error: unrecognized command line option "-mp"
make: *** [lqs.o] Error 1
make: Leaving directory `/tmp/R.INSTALL.r19401/VR/MASS/src'
ERROR: compilation failed for package 'MASS'
** Removing '/opt/freewaresrc/R/R-2.6.2/library/MASS'
** Removing '/opt/freewaresrc/R/R-2.6.2/library/class'
** Removing '/opt/freewaresrc/R/R-2.6.2/library/nnet'
** Removing '/opt/freewaresrc/R/R-2.6.2/library/spatial'
make: *** [VR.ts] Error 1
make: Leaving directory
make: *** [recommended-packages] Error 2
make: Leaving directory
make: *** [stamp-recommended] Error 2
# etc/Makeconf. Generated from Makeconf.in by configure.
AR = ar
BLAS_LIBS = -L$(R_HOME)/lib$(R_ARCH) -lRblas C_VISIBILITY = CC = icc
-c99 CFLAGS = -g -O3 -wd188 -ip CPICFLAGS = -fpic CPPFLAGS =
-I/usr/local/include CXX = icpc CXXCPP = icpc -E CXXFLAGS = -g -O3
CXXPICFLAGS = -fpic DYLIB_EXT = .so DYLIB_LD = icc -c99 DYLIB_LDFLAGS =
-shared DYLIB_LINK = $(DYLIB_LD) $(DYLIB_LDFLAGS) $(LDFLAGS) ECHO_C =
ECHO_N = -n ECHO_T =
F77 = ifort
FC = ifort
FCFLAGS = -g -O3 -mp
FFLAGS = -g -O3
FLIBS = -lifport -lifcore -limf -lsvml -lm -lipgo -lirc -lgcc_s -lirc_s
-ldl FCPICFLAGS = -fpic FPICFLAGS = -fpic ....
The only reference to gcc I could find was OBJC = gcc
Could this be a problem? I tried changing this to icc -c99 but this
made no difference.
Since it seems to work for other users, I assume there is something in
my setup that is preventing it from working, though I am not sure where
to look. PATH and other environment variables look okay. Any
suggestions would be welcome.
From: Prof Brian Ripley [mailto:ripley at stats.ox.ac.uk]
Sent: Wednesday, 13 February 2008 4:59 PM
To: Denham Robert
Cc: r-help at r-project.org
Subject: Re: [R] compiling 2.6.2 using icc
It's working for other users of icc. Check what CC is set to in
etc/Makeconf, and if it is not 'icc -c99', reset it.
On Wed, 13 Feb 2008, Denham Robert wrote:
> I am having trouble compiling R-2.6.2 on suse linux x86_64 using the
> intel compiler. I read section C.2.1 Intel compilers in the R
> Installation and Administration manual, and put
> CFLAGS="-g -O3 -wd188 -ip"
> FFLAGS="-g -O3"
> LDFLAGS="-L$ICC_LIBS -L$IFC_LIBS -L/usr/lib64"
> CXXFLAGS="-g -O3"
> FCFLAGS="-g -O3 -mp"
> in my config.site. Everything seems to compile alright, up until
> making the recommended package MASS. The output below shows that it
> is using gcc rather than icc when compiling the package, and the
> CFLAGS wd188 and ip . How do I get it to use icc for both building R
> and building the packages?
> make: Entering directory
> begin installing recommended package VR
> * Installing *source* package 'MASS' ...
> ** libs
> make: Entering directory `/tmp/R.INSTALL.Z28650/VR/MASS/src'
> gcc -I/opt/freewaresrc/R/R-2.6.2/include
> -I/opt/freewaresrc/R/R-2.6.2/include -I/usr/local/include -mp -fpic
> -g -O3 -wd188 -ip -c lqs.c -o lqs.o
> gcc: unrecognized option '-wd188'
> cc1: error: unrecognized command line option "-ip"
> cc1: error: unrecognized command line option "-mp"
> make: *** [lqs.o] Error 1
> make: Leaving directory `/tmp/R.INSTALL.Z28650/VR/MASS/src'
> ERROR: compilation failed for package 'MASS'
> ** Removing '/opt/freewaresrc/R/R-2.6.2/library/MASS'
> ** Removing '/opt/freewaresrc/R/R-2.6.2/library/class'
> ** Removing '/opt/freewaresrc/R/R-2.6.2/library/nnet'
> ** Removing '/opt/freewaresrc/R/R-2.6.2/library/spatial'
> make: *** [VR.ts] Error 1
> make: Leaving directory
> make: *** [recommended-packages] Error 2
> make: Leaving directory
> make: *** [stamp-recommended] Error 2
> ** The information in this email together with any attachments is
> intended only for the person or entity to which it is addressed and
> may contain confidential and/or privileged material.
> Any form of review, disclosure, modification, distribution and/or
> publication of this email message is prohibited, unless as a necessary
> part of Departmental business.
> If you have received this message in error, you are asked to inform
> the sender as quickly as possible and delete this message and any
> copies of this message from your computer and/or your computer system
> R-help at r-project.org mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help