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

Dirk Eddelbuettel edd @end|ng |rom deb|@n@org
Tue Apr 12 03:18:29 CEST 2022


Ben,

I fear your post is too short on specifics on versions tested, and results
seen. We need more drill-down on what-version-where and the results it got.

So to bootstrap, "here" on my personal dev box I where I tend to keep an
installation of R-devel (using its embedded LAPACK/BLAS sources) as well as
the standard R package I stand behind for Debian/Ubuntu (which tends to use
external libraries for BLAS/LAPACK).


Now, here I seem to get a different error between reference BLAS/LAPACK and
external BLAS/LAPACK:


1) R-devel (as SVN r82134) 
   using libRblas.so + libRlapack.so (i.e. "reference BLAS") gets me
   
   Error in chol.default(Hessian) : 
     the leading minor of order 2 is not positive definite


2) R-devel as I upload to Debian, same SVN r82134
   using external blas: openblas-pthread/{libblas.so.3 + libopenblasp-r0.3.20.so}

   package version libopenblas0 0.3.20, liblapack 3.10.0
  
   Error in solve.default(chol(Hessian), gradient) : 
     system is computationally singular: reciprocal condition number = 0


3) For what it is worth every release R version I put into Debian and which
   is still available (easily, I find) via rocker/r-base or r-base images

   Using 4.0.4 here (again: openblas-pthread/{libblas.so.3 + libopenblasp-r0.3.13.so}
   (but possibly an older version -- libopenblas 0.3.13, liblapack 3.9.0-3)

   Error in solve.default(chol(Hessian), gradient) : 
     system is computationally singular: reciprocal condition number = 0


I don't claim that the above is complete; I am only pointing out that both
LAPACK 0.3.9 and 0.3.10 _get me the same error_.  Conrad and I recently did
dig up an issue for (Rcpp)Armadillo where 0.3.10 _was_ different from 0.3.9,
but that was for complex-value variables.

The bigger difference seems to be between using R's reference blas, and
external blas.  I have for a decade+ used external BLAS even when the
official word to prefer reference BLAS. Now, and very recently NEWS in R seem
to go the same way prefering 0.3.10 where available.

I hope this helps. I can give you pointers (off-list) if you want to dig some
more via Docker and different combinations.


Cheers, Dirk


-- 
dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org



More information about the R-package-devel mailing list