[Rd] boneheaded BLAS questions

Dirk Eddelbuettel edd @end|ng |rom deb|@n@org
Thu Mar 18 03:25:02 CET 2021


This stuff has worked unchanged since the 1990s when we had a _really_ far
sighted fellow in Debian come up with the 'switch the links' scheme which was
(and is) subsequently deployed by many numerical applications within Debian,
R and e.g. Octave included.

And I used this ability to switch over a decade ago in a never-quite-finished
paper which resulted in a package as well as a vignette as paper draft on
CRAN: gcbd [1] It used the ability to switch between implementation to time
and compare and benchmark the various BLAS and LAPACK libraries -- which was
then motivated by a comparison with GPUs. (The actual code / package is
stale-ish as some of the underlying packages have gone as eg the GPU one --
but the mechanics you are after still work the exact same way on Debian and
derivarives including Ubuntu and PopOS.)

(As a complete aside, the state of the art here is now one level up in
libraries based on flame/blis (a riff on blas) which can do a similar logical
switch _at runtime_ (rather than by flipping softlinks and restarting the
app). Julia and some other languages uses that, I think Fedora may have it in
its R build as well. Inaki may know more...)

That said, from the top of my head, I think you error may just be with the
second R compilation -- I always (i.e. for the Debian package) use both
  --with-blas --with-lapack
and not just --with-blas. And I do there is public: if you know where to look
you can see the exact invocation of the Debian build of the R package (which
Ubuntu and Pop and ... then shadow) [2]

Hth, Dirk

[1] https://cran.r-project.org/package=gcbd
[2] https://sources.debian.org/src/r-base/4.0.4-1/debian/rules/
    (and I apologise for how messy this still is)
https://dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org

More information about the R-devel mailing list