[Rd] problem building R-patched on x86-64 with PGI 6.1
Liaw, Andy
andy_liaw at merck.com
Fri Mar 10 22:35:20 CET 2006
Dear R-devel,
[I'm not sure if this is appropriate for R-devel. If not, I'm more than
happy to move it to R-help.]
As those of you who saw my post on R-help know, I've been trying to build
R-patched on a dual Opteron box running Scyld Beowulf, using the PGI 6.1
compilers. The build went fine, but I couldn't get it to pass make
check-all. Jennifer Lai, who reported success with PGI 6.0 previously,
seems to have the same problem with 6.1. Here are the particulars:
Since R requires IEEE754 conformance, the flag to use for PGI is -Kieee.
(BTW, configure still insist on sticking in -mieee-fp, which generates a
warning.) With that flag, the build runs into trouble with the first
example in ?optim. Running it by hand gives me:
> optim(c(-1.2,1), fr, control=list(trace=6))
Nelder-Mead direct search function minimizer
function value for initial parameters = 24.200000
Scaled convergence tolerance is 3.60608e-07
Stepsize computed as 0.120000
BUILD 3 24.200000 7.095296
REFLECTION 5 15.080000 4.541696
REFLECTION 7 7.095296 4.456256
[...]
HI-REDUCTION 191 0.000002 0.000000
LO-REDUCTION 193 0.000001 0.000000
and the process just hangs (until ctrl-z and kill -9).
If I build R without the -Kieee flag, make check-all fails at arith-true.R,
in particular, the following:
> pretty(pi, n = 10) - 2:5
[1] -2.220446e-16 -4.440892e-16 -8.881784e-16 -8.881784e-16
whereas the build with the -Kieee flag gives:
> pretty(pi, n = 10) - 2:5
[1] 0 0 0 0
and can pass the arith-true.R test.
The configuration is as follows:
export PG_HOME=/usr/pgi/linux86-64/6.1
~/Rbuild/R-patched/configure \
CC=pgcc \
CFLAGS="-g -Kieee" \
CPPFLAGS="-I$PG_HOME/include -I$PG_HOME/include/CC" \
CPICFLAGS=-fpic \
F77=pgf95 \
FFLAGS="-g -Kieee"\
FPICFLAGS=-fpic \
CXX=pgCC \
CXXFLAGS="-g -Kieee" \
CXXPICFLAGS=-fpic \
SHLIB_CXXLDFLAGS=-shared \
SHLIB_LDFLAGS=-shared \
LDFLAGS="-L$PG_HOME/libso -L/usr/lib64 -L/usr/X11R6/lib64" \
--without-tcltk \
--with-blas="-L/usr/pgi/linux86-64/6.1/libso -lacml"
[The pgf95 (or pgf90) is needed for linking against ACML to work. This
should be unrelated as optim is in C.]
I'd very much appreciate any pointers.
Best,
Andy
Andy Liaw, PhD
Biometrics Research PO Box 2000 RY33-300
Merck Research Labs Rahway, NJ 07065
andy_liaw(a)merck.com 732-594-0820
More information about the R-devel
mailing list