On Wed, 1 Jul 2020 at 19:03, 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
openblas-serial: use if the application is multithreaded
openblas-threads: use if the application is single-threaded
I've always found the naming of the openblas packages to be confusing,
so that may not be right. Somebody set me straight if so.
The naming means (the same for BLIS):
-serial: runs single-threaded.
-openmp: some parts use OpenMP.
-threads: runs multi-threaded.
So it's a property of the OpenBLAS build, not a property of the
application. In fact, the serial version is not thread-safe unless you
activate a particular option at build time. We found that issue
recently and fixed it, and BTW the workaround was to switch to
openblas-openmp.
Potentially, you could run every version regardless of the
application, but some combinations are clearly a no-go, like a
threaded OpenBLAS in a threaded application.
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?
That combination is fine AFAIK. But I don't know whether the serial
version would perform better in that situation or not at all.
I'll bother the FlexiBLAS maintainer about this. :) They use FlexiBLAS
as a research tool in high-performance computing, so maybe he knows
better about all these possible combinations.
--
Iñaki Úcar