On Wed, 1 Jul 2020 at 20:13, Susi Lehtola
<jussilehtola(a)fedoraproject.org> wrote:
On Wed, 1 Jul 2020 10:54:16 -0600
Jerry James <loganjerry(a)gmail.com> wrote:
> On Wed, Jul 1, 2020 at 10:26 AM Iñaki Ucar <iucar(a)fedoraproject.org>
> wrote:
> > BTW, I would also like to discuss here, as part of this proposal,
> > which backend should be the system-wide default. I believe we all
> > would agree that OpenBLAS nowadays is the best choice. But then, the
> > serial or the openmp version?
>
> First, I want to make sure I understand the current openblas
> packaging. Is this correct?
>
> openblas-openmp: use if the application uses OpenMP
Yes; then OpenBLAS calls get run in parallel in single-threaded regions
of the code, and if sequential mode in regions that are already
running parallel.
> openblas-serial: use if the application is multithreaded
> openblas-threads: use if the application is single-threaded
No, this is exactly the wrong way around. You should use the serial
library for code that you want to be running in serial (this way you
can get several instances of the program running efficiently), and the
pthreads version if you want to run the BLAS/LAPACK regions in parallel
(but are somehow opposed to OpenMP!)..
I think I'm more confused than before. :D
> The question of the default is a hard one. What happens if a
> multithreaded application that does not use OpenMP is linked with the
> OpenMP build of OpenBLAS?
Then you get too much parallellism, i.e. every call to OpenBLAS will
launch several threads, and this will naturally ruin your scaling.
So would you say that openblas-serial is the most sensible system-wide default?
--
Iñaki Úcar