Skip to content
Prev 7938 / 12125 Next

[R-pkg-devel] help with BLAS/LAPACK version debugging

If it helps, this is on Windows 10 64bit, R 4.2.0alpha, OpenBLAS
0.3.17 (single threaded, custom compiled for i7-8700K Skylake which
functions as a Haswell), but default R LAPACK since I still have not
figured out how to link to a precompiled LAPACK when building natively
on Windows.

Thanks,

Avi

# 1
set.seed(101)
d <- data.frame(z=rnorm(200),
                  f=factor(sample(1:10,200, replace=TRUE)))
library(lme4)
library(testthat)
fm1 <- lmer(z~ as.numeric(f) + 1|f, d)

R throws--> "boundary (singular) fit: see help('isSingular')"
coefs=c(1,1),
                                  ctrl=lmerControl()$checkConv,lbound=0),
                 "Problem with Hessian check")

(No warning thrown)

# 2
dd <- list(gradient = c(0.00132136676711525, 0.00898197413334856, 0),
   Hessian = structure(c(195.253128051758, 962.483270645142,
                         0, 962.483270645142, NA, 0, 0, 0, 6542.44775390625),
                         dim = c(3L, 3L)))
with(dd, solve(chol(Hessian),gradient))

R throws--> Error in h(simpleError(msg, call)) :
  error in evaluating the argument 'a' in selecting a method for
function 'solve': the leading minor of order 2 is not positive
definite

# 3 (Windows returns empty strings for BLAS and LAPACK)

R version 4.2.0 alpha (2022-04-03 r82074 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19043)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.utf8  LC_CTYPE=English_United
States.utf8    LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C                           LC_TIME=English_United
States.utf8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] testthat_3.1.3 lme4_1.1-29    Matrix_1.4-1

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.8.3    lattice_0.20-45 rprojroot_2.0.3 withr_2.5.0
brio_1.1.3      MASS_7.3-56     grid_4.2.0
 [8] R6_2.5.1        nlme_3.1-157    magrittr_2.0.3  rlang_1.0.2
cli_3.2.0       minqa_1.2.4     nloptr_2.0.0
[15] boot_1.3-28     desc_1.4.1      splines_4.2.0   tools_4.2.0
pkgload_1.2.4   compiler_4.2.0
On Tue, Apr 12, 2022 at 1:18 AM Dirk Eddelbuettel <edd at debian.org> wrote: