[R-sig-hpc] issue building R 2.12.1 on CrayXT

Tom Hilinski tom.hilinski at colostate.edu
Fri Feb 11 04:02:12 CET 2011


Thanks for the suggestions. Tried a vanilla build in a couple of ways,
same result. After much coffee and eye strain, I figured out there are 2
types of issues involved, the Cray enviroment, and problems with the R
configure script. I'll provide details here just in case they are helpful.

The Cray uses "modules" to specify a set of tools, libraries, and
configurations. However, the type of GNU environment did not seem to
affect the issues. One thing you do on the Cray is replace your compiler
command with generic names whose real command varies according to the
modules loaded. So gcc becomes "cc", and gfortran, "ftn", for instance.
The other thing I had to do was add the flag "-dynamic" to the ld flags.

The configure script's results had several issues:
* Added an extra "/" to /usr/local/lib.
* Declared and used the archaic GNU C library function __setfpucw.
* "make clean" only cleans some things, but not exes nor libraries.
* configure switches --without-blas and --without-lapack apparently do
nothing, since the libraries are built and linked anyway.

Here's how I managed to build R on the Cray XT:

1. Load the modules I wanted:
    module unload PrgEnv-cray
    module load PrgEnv-gnu
    module unload gcc/4.1.2
    module load gcc/4.4.4

2. Clean up my previous mess properly:
    make clean
    rm bin/R*
    rm lib/lib*

3. configure command:

./configure --prefix=~/lustrefs CC=cc CXX=CC FC=ftn F77=ftn F90=ftn
--without-x --disable-R-profiling

4. Issue: In Makeconf, "/usr/local//lib"
    Fix:   Delete extra slash.

5. Issue: cc line needs "-dynamic" option or will not find "-lRblas".
    Fix:   In Makeconf, add option to macro below
            MAIN_LDFLAGS = -dynamic [...]

6. Issue: __setfpucw not loaded. Used in src/unix/sys-unix.c.
    Fix:   In src/include/config.h change from 1 to zero for the macro:
       #undef NEED___SETFPUCW


Now all builds and runs! Off I go with hundreds of cores waiting for my
commands...



More information about the R-sig-hpc mailing list