[R] error returned by "make check" in R-2.5.0
Eric Thompson
ericthompso at gmail.com
Sat Apr 28 19:41:29 CEST 2007
Professor Ripley,
Thank you for your comments.
On 4/28/07, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:
> How big is abs(lam - lam2[i])/Meps ?
Here is the result on my system:
> abs(lam - lam2[i])/Meps
[1] 60 18 17 0 12
which is quite surprising to me that the maximum value exactly equals
the cutoff, so perhaps this is not such a big problem. I changed the
value to 61 in the reg-tests-1.R file, and then make check runs with
no errors.
> This could be one of those cases where your system (which CPU, what
> compilers?) is unusually inaccurate, but Linux systems do not usually
> differ much in their accuracies on the same CPU.
It is somewhat disconcerting that my system is unusually inaccurate.
I'm running Intel Xeon 3.20GHz CPUs and I've been using gcc 4.1.1 and
ifort to compile R (these are what the compile script choose by
default on my system). Perhaps it is a bad idea to mix the GNU and
Intel compilers?
> I've checked several systems, as see maximum values of around 40.
>
> R 2.5.0 has an updated LAPACK so it will be different from 2.4.1. My
> hunch is that this is a compiler optimization bug, so you could see what
> happens at lower optimization levels.
I'm not sure how to do this, but from reading R-admin.html, my guess
is that setting the CFLAGS for ./configure will change the
optimization level for LAPACK compilation, so I used
./configure CFLAGS="-g -O"
And after make, I find the exact same values as before.
So I thought I'd try to set the Fortran compiler to a GNU compiler, to
be consistent with gcc. When I set F77=g77, make check finishes fine,
and running the same test
> abs(lam - lam2[i])/Meps
[1] 32 8 17 1 2
which makes me more comfortable. Also, if I use the g95 compiler
(./configure F77=g95), the eigen test gives
> abs(lam - lam2[i])/Meps
[1] 48.0 10.0 10.5 9.0 6.0
So, I suppose I will use the g77 compiler.
Eric Thompson
Tufts University
Civil & Environmental Engineering
Graduate Student
> On Fri, 27 Apr 2007, Eric Thompson wrote:
>
> > Today I tried to install the R-2.5.0 (currently running R-2.4.1) on
> > Mandriva Linux. The ./configure and make commands seem to run fine,
> > but "make check" gives the following messages:
> >
> > running regression tests
> > make[3]: Entering directory `/home/ethomp04/R-2.5.0/tests'
> > running code in 'reg-tests-1.R' ...make[3]: *** [reg-tests-1.Rout] Error 1
> > make[3]: Leaving directory `/home/ethomp04/R-2.5.0/tests'
> > make[2]: *** [test-Reg] Error 2
> > make[2]: Leaving directory `/home/ethomp04/R-2.5.0/tests'
> > make[1]: *** [test-all-basics] Error 1
> > make[1]: Leaving directory `/home/ethomp04/R-2.5.0/tests'
> > make: *** [check] Error 2
> >
> > Regarding "make check", the R-admin.html page says "Failures are not
> > necessarily problems as they might be caused by missing
> > functionality..."
> >
> > So, looking at the "reg-tests-1.Rout.fail" file, I see that the error
> > occurs here:
> >
> >> ## eigen
> >> Meps <- .Machine$double.eps
> >> set.seed(321, kind = "default") # force a particular seed
> >> m <- matrix(round(rnorm(25),3), 5,5)
> >> sm <- m + t(m) #- symmetric matrix
> >> em <- eigen(sm); V <- em$vect
> >> print(lam <- em$values) # ordered DEcreasingly
> > [1] 5.1738946 3.1585064 0.6849974 -1.6299494 -2.5074489
> >>
> >> stopifnot(
> > + abs(sm %*% V - V %*% diag(lam)) < 60*Meps,
> > + abs(sm - V %*% diag(lam) %*% t(V)) < 60*Meps)
> >>
> >> ##------- Symmetric = FALSE: -- different to above : ---
> >>
> >> em <- eigen(sm, symmetric = FALSE); V2 <- em$vect
> >> print(lam2 <- em$values) # ordered decreasingly in ABSolute value !
> > [1] 5.1738946 3.1585064 -2.5074489 -1.6299494 0.6849974
> >> print(i <- rev(order(lam2)))
> > [1] 1 2 5 4 3
> >> stopifnot(abs(lam - lam2[i]) < 60 * Meps)
> > Error: abs(lam - lam2[i]) < 60 * Meps is not all TRUE
> > Execution halted
> >
> >
> > Interestingly, running these same tests on R-2.4.1 on the same system
> > does not give an error:
> >
> >> Meps <- .Machine$double.eps
> >> set.seed(321, kind = "default") # force a particular seed
> >> m <- matrix(round(rnorm(25),3), 5,5)
> >> sm <- m + t(m) #- symmetric matrix
> >> em <- eigen(sm); V <- em$vect
> >> print(lam <- em$values) # ordered DEcreasingly
> > [1] 5.17389456321 3.15850637323 0.68499738238 -1.62994940108 -2.50744891774
> >> stopifnot(
> > + abs(sm %*% V - V %*% diag(lam)) < 60*Meps,
> > + abs(sm - V %*% diag(lam) %*% t(V)) < 60*Meps)
> >>
> >> ##------- Symmetric = FALSE: -- different to above : ---
> >>
> >> em <- eigen(sm, symmetric = FALSE); V2 <- em$vect
> >> print(lam2 <- em$values) # ordered decreasingly in ABSolute value !
> > [1] 5.17389456321 3.15850637323 -2.50744891774 -1.62994940108 0.68499738238
> >> print(i <- rev(order(lam2)))
> > [1] 1 2 5 4 3
> >> stopifnot(abs(lam - lam2[i]) < 60 * Meps)
> >> abs(lam - lam2[i]) < 60 * Meps
> > [1] TRUE TRUE TRUE TRUE TRUE
> >
> > I'm not sure what to do next, or how serious of a problem this might
> > be. I would appreciate any suggestions or advice. I thought maybe this
> > was due to something about how my system is setup, but since I don't
> > get the error in R-2.4.1, that seems to imply to me that there is
> > something different in R-2.5.0 that is causing it.
> >
> > Thanks.
> >
> > Eric Thompson
> > Tufts University
> > Civil & Environmental Engineering
> >
> >> sessionInfo()
> > R version 2.4.1 (2006-12-18)
> > i686-pc-linux-gnu
> >
> > locale:
> > LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C
> >
> > attached base packages:
> > [1] "datasets" "utils" "stats" "graphics" "grDevices" "methods"
> > [7] "base"
> >
> > other attached packages:
> > MASS
> > "7.2-31"
> >
> > ______________________________________________
> > R-help at stat.math.ethz.ch 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.
> >
>
> --
> 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
mailing list