unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eric Brown <ecbrown@ericcbrown.com>
To: "Ludovic Courtès" <ludovic.courtes@inria.fr>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: LAPACK vs. OpenBLAS
Date: Tue, 29 Jun 2021 11:00:06 -0500	[thread overview]
Message-ID: <87wnqchda1.fsf@ericcbrown.com> (raw)
In-Reply-To: <87im1wrb1b.fsf@gnu.org> ("Ludovic Courtès"'s message of "Tue, 29 Jun 2021 16:38:24 +0200")

Hi Ludo'!

Ludovic Courtès <ludovic.courtes@inria.fr> writes:

> Hi Eric,
>
> Eric Brown <ecbrown@ericcbrown.com> skribis:
>
> Are there other cases where netlib BLAS is considered more appropriate
> than OpenBLAS because it’s more numerically stable?
>

Sorry about that, the full discussion is here:

https://cran.r-project.org/doc/manuals/r-devel/R-admin.html#Linear-algebra

To answer your question on other examples:
I would have to do some digging for the exact details, but there was
once a time when LAPACK 3.x had an SVD that would solve with QR, most
expensive but would give an answer for the "most singular" of problems.
It is not, however, the "published" LAPACK algorithm and is not available.

(A classic case where this occurs is when throwing junk into a linear
regression, whose solution is bullet-proof with the SVD.  Very important
for R, and many more langs and other problems such as factor analysis.)

A few random points:

* Good/improving compilers gfortran,gcc often make the reference
lapack/blas fast enough.  IIRC it is good as any optimized BLAS for
small matrices. If reporting e.g. convergence issues, people converge
here for apples-to-apples.

* ATLAS can empirically tune for architectures that are not getting love
by the OpenBLAS team.  So, non-amd64 has *something* more performant
than Reference LAPACK/BLAS.  I've often seen distributed binaries have
to choose something lackluster to satisfy older processors.

* I usually use OpenBLAS because it also gives SMP.  I notice it doesn't
  cover all the archs that Guix covers, but I think it should be default
  go-to unless of problems for x86_64 at least.

* If memory serves, layering multiple LAPACKs came from the days when
  the optimized BLAS's where incomplete. People just slapped -llapack on
  the end to make sure that if the optimized lib didn't get it then
  lapack would, just that would be only at Fortran speed :-(   lol

Best regards,
Eric



  reply	other threads:[~2021-06-29 16:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-24 12:55 LAPACK vs. OpenBLAS Ludovic Courtès
2021-06-24 13:58 ` zimoun
2021-06-24 15:00 ` Eric Brown
2021-06-29 14:38   ` Ludovic Courtès
2021-06-29 16:00     ` Eric Brown [this message]
2021-06-29 16:13     ` Eric Brown
  -- strict thread matches above, loose matches on Subject: below --
2021-08-06 12:32 Paul Garlick

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wnqchda1.fsf@ericcbrown.com \
    --to=ecbrown@ericcbrown.com \
    --cc=guix-devel@gnu.org \
    --cc=ludovic.courtes@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).