[Rd] Trying to compile R 4.2.x on Linux as 32bit sub-architecture
Berwin A Turlach
berw|n@tur|@ch @end|ng |rom gm@||@com
Sat Jun 18 20:30:03 CEST 2022
G'day all,
On Sat, 18 Jun 2022 22:58:19 +0800
Berwin A Turlach <Berwin.Turlach using gmail.com> wrote:
> [...] I attach the relevant file from trying to compile R-patched
> during last night's run.
Mmh, on the web-interface to the mailing list I see that the attachment
might have been deleted. Perhaps because it was too large?
So below the start and the final part from reg-tests-1d.Rout.fail which
shows where the error occurs.
Cheers,
Berwin
----------------------------
R version 4.2.1 RC (2022-06-17 r82501) -- "Funny-Looking Kid"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu/32 (32-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> ## Regression tests for R >= 3.4.0
[...very large snip...]
> ## pretty(x) when range(x) is finite but diff(range(x)) is +/- Inf:
> B <- 1e308; 2*B; (s <- seq(-B,B,length.out = 3))
[1] Inf
[1] -1e+308 0e+00 1e+308
> options(warn=1) # => warnings *as they happen*
> (ps <- pretty(c(-B,B)))
[1] -1e+308 -5e+307 0e+00 5e+307 1e+308
> ## Warning in pretty.default(c(-B, B)) :
> ## Internal(pretty()): very large range 4e+307, corrected to 2.24712e+307
> nps <- length(ps)
> dd <- sum((dps <- diff(ps))/length(dps)) # mean w/o overflow
> epsC <- .Machine$double.eps
> relD <- (dps/dd - 1)/epsC
> relEr <- function(f, y) abs((f-y)/(f+y)*2) # cheap relative error, |f| > 0 !
> stopifnot(is.finite(mean(ps)), ## these all failed without "long-double"
+ is.finite(mdp <- mean(dps)),
+ all.equal(dd, mdp, tolerance=1e-15))
> stopifnot(relEr(c(-B,B), ps[c(1L,nps)]) <= 4*epsC,
+ -8 <= relD, relD <= 8) # seen [-1.5,.., 3.0]; w/o long-double: [-5, .., 4]
> ## ps was 0 Inf Inf Inf Inf Inf Inf Inf Inf Inf 0 , in R <= 4.1.0
> f. <- c(-1.797, -1.79, -1.75, seq(-1.7, -1, by=.1))
> stopifnot(!is.unsorted(f.)) ; f.nm <- setNames(, f.)
> fmtRng <- function(x) paste(format(range(x)), collapse=", ")
> ns <- c(2:12, 15, 20, 30, 51, 100, 2001, 1e5)
> nms.n <- formatC(ns, digits=0, format="f")
> nmsRng <- c(t(outer(paste0("r",1:2), c("lo","hi"), paste, sep=".")))
> rr <- matrix(NA, length(ns), 4, dimnames=list(nms.n, nmsRng))
> for(i.n in seq_along(ns)) {
+ n <- ns[i.n]
+ cat("n = ", n,":\n--------\n")
+ pBL <- lapply(f., function(f) structure(pretty(c(f*1e308, 2^1023.9), n), f=f))
+ ## -> a warning per f
+ n.s <- lengths(pBL) # how close to target 'n' ??
+ cat("lengths(.) in [", fmtRng(n.s), "]\n")
+ if(n <= 15) stopifnot(n.s <= 20)# seen {14,..,17}
+ else stopifnot(abs(n.s/n - 1) <= 1/2)
+ if(n) cat("length(.) <> n relative err in [", fmtRng(n.s/n - 1), "]\n")
+ ## .pretty(*, bounds=FALSE) :
+ prM <- t(sapply(f.nm, function(f)
+ unlist( .pretty(c(f*1e308, 2^1023.9), n, bounds=FALSE) )))
+ print(prM)
+ luM <- prM[,c("ns","nu")] * prM[,"unit"] # the pretty-scaled unit
+ r1 <- luM[,"ns"] / (f.nm*1e308)
+ rr[i.n, 1:2] <- r1 <- range(r1)
+ cat(sprintf("range(r1): [%g, %g]\n", r1[1], r1[2]))
+ r2 <- luM[,"nu"] / 2^1023.9
+ rr[i.n, 3:4] <- r2 <- range(r2)
+ cat(sprintf("range(r2): [%g, %g]\n", r2[1], r2[2]))
+ stopifnot(exprs = { is.matrix(prM)
+ prM[,"nu"] - prM[,"ns"] == prM[,"n"] # could differ, but not for this data
+ identical(colnames(prM), c("ns", "nu", "n", "unit"))
+ ## These bounds depend on 'n' :
+ r1 >= if(n <= 12) 0.55 else 0.89
+ r1 <= if(n <= 15) 1.4 else 1.1
+ r2 >= if(n <= 12) 0.58 else 0.95
+ r2 <= if(n <= 15) 1 else 1.025
+ })
+ invisible(lapply(pBL, function(ps) {
+ mdB <- sum((dB <- diff(ps))/length(dB))
+ rd <- dB/mdB - 1 # relative differences
+ ## print(range(rd))
+ x <- c(attr(ps,"f")*1e308, 2^1023.9)
+ stopifnot(if(n >= 1) abs(rd) <= n * 3e-15 else TRUE,
+ ps[1] <= x[1] , x[2] <= ps[length(ps)])
+ }))
+ }
n = 2 :
--------
Warning in pretty.default(c(f * 1e+308, 2^1023.9), n) :
R_pretty(): very large range 'cell'=1.73715e+308, corrected to 1.43815e+308
Warning in pretty.default(c(f * 1e+308, 2^1023.9), n) :
R_pretty(): very large range 'cell'=1.73365e+308, corrected to 1.43815e+308
Warning in pretty.default(c(f * 1e+308, 2^1023.9), n) :
R_pretty(): very large range 'cell'=1.71365e+308, corrected to 1.43815e+308
Warning in pretty.default(c(f * 1e+308, 2^1023.9), n) :
R_pretty(): very large range 'cell'=1.68865e+308, corrected to 1.43815e+308
Warning in pretty.default(c(f * 1e+308, 2^1023.9), n) :
R_pretty(): very large range 'cell'=1.63865e+308, corrected to 1.43815e+308
Warning in pretty.default(c(f * 1e+308, 2^1023.9), n) :
R_pretty(): very large range 'cell'=1.58865e+308, corrected to 1.43815e+308
Warning in pretty.default(c(f * 1e+308, 2^1023.9), n) :
R_pretty(): very large range 'cell'=1.53865e+308, corrected to 1.43815e+308
Warning in pretty.default(c(f * 1e+308, 2^1023.9), n) :
R_pretty(): very large range 'cell'=1.48865e+308, corrected to 1.43815e+308
Warning in pretty.default(c(f * 1e+308, 2^1023.9), n) :
R_pretty(): very large range 'cell'=1.43865e+308, corrected to 1.43815e+308
lengths(.) in [ 1, 3 ]
length(.) <> n relative err in [ -0.5, 0.5 ]
Warning in .pretty(c(f * 1e+308, 2^1023.9), n, bounds = FALSE) :
R_pretty(): very large range 'cell'=1.73715e+308, corrected to 1.43815e+308
Warning in .pretty(c(f * 1e+308, 2^1023.9), n, bounds = FALSE) :
R_pretty(): very large range 'cell'=1.73365e+308, corrected to 1.43815e+308
Warning in .pretty(c(f * 1e+308, 2^1023.9), n, bounds = FALSE) :
R_pretty(): very large range 'cell'=1.71365e+308, corrected to 1.43815e+308
Warning in .pretty(c(f * 1e+308, 2^1023.9), n, bounds = FALSE) :
R_pretty(): very large range 'cell'=1.68865e+308, corrected to 1.43815e+308
Warning in .pretty(c(f * 1e+308, 2^1023.9), n, bounds = FALSE) :
R_pretty(): very large range 'cell'=1.63865e+308, corrected to 1.43815e+308
Warning in .pretty(c(f * 1e+308, 2^1023.9), n, bounds = FALSE) :
R_pretty(): very large range 'cell'=1.58865e+308, corrected to 1.43815e+308
Warning in .pretty(c(f * 1e+308, 2^1023.9), n, bounds = FALSE) :
R_pretty(): very large range 'cell'=1.53865e+308, corrected to 1.43815e+308
Warning in .pretty(c(f * 1e+308, 2^1023.9), n, bounds = FALSE) :
R_pretty(): very large range 'cell'=1.48865e+308, corrected to 1.43815e+308
Warning in .pretty(c(f * 1e+308, 2^1023.9), n, bounds = FALSE) :
R_pretty(): very large range 'cell'=1.43865e+308, corrected to 1.43815e+308
ns nu n unit
-1.797 0 0 0 Inf
-1.79 0 0 0 Inf
-1.75 0 0 0 Inf
-1.7 0 0 0 Inf
-1.6 0 0 0 Inf
-1.5 0 0 0 Inf
-1.4 0 0 0 Inf
-1.3 0 0 0 Inf
-1.2 0 0 0 Inf
-1.1 -1 1 2 1e+308
-1 -1 1 2 1e+308
range(r1): [NaN, NaN]
range(r2): [NaN, NaN]
Error: r1 >= if (n <= 12) 0.55 else 0.89 are not all TRUE
Execution halted
More information about the R-devel
mailing list