Bug 1619050 - ocaml-gsl: use openblas instead of atlas
Summary: ocaml-gsl: use openblas instead of atlas
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: ocaml-gsl
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1506952
TreeView+ depends on / blocked
 
Reported: 2018-08-19 23:05 UTC by Dominik 'Rathann' Mierzejewski
Modified: 2018-08-20 11:11 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-08-20 11:11:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Dominik 'Rathann' Mierzejewski 2018-08-19 23:05:49 UTC
Description of problem:
Please BuildRequire: openblas instead of atlas where available (x86_64 %{ix86} armv7hl %{power64} aarch64 s390x, see %{openblas_arches} macro defined in openblas-srpm-macros package). Currently, it's available on all primary Fedora arches, so you can technically skip using the macro.

Version-Release number of selected component (if applicable):
ocaml-gsl-1.19.1-15.fc29

Additional information:
OpenBLAS selects best code path for the target architecture at runtime unlike ATLAS.

A lot of benchmarks around the net suggest openblas is faster than ATLAS in most workloads:
https://github.com/tmolteno/necpp/issues/18
http://blog.nguyenvq.com/blog/2014/11/10/optimized-r-and-python-standard-blas-vs-atlas-vs-openblas-vs-mkl/
https://freddie.witherden.org/pages/blas-gemm-bench/
http://nghiaho.com/?p=1726

Many Fedora packages have switched to openblas already (e.g. scalapack and all dependent ones and numpy).

Comment 1 Richard W.M. Jones 2018-08-20 08:01:54 UTC
Back in 2015 we switched from CBLAS to Atlas because the performance
was supposed to be better:

https://lists.fedoraproject.org/pipermail/devel/2015-February/thread.html#208146

Has this advice changed?  Is CBLAS the same as OpenBLAS?  (If only
there was just one numeric library ...)

Comment 2 Richard W.M. Jones 2018-08-20 08:17:56 UTC
Also is GSL different from BLAS?  Uses BLAS?
(Imagine I know nothing about this topic at all when answering)

Comment 3 Richard W.M. Jones 2018-08-20 08:19:26 UTC
Proposed fix:
https://koji.fedoraproject.org/koji/taskinfo?taskID=29195993

This is now linking using:

-lgsl -lopenblas -lm

Comment 4 Dominik 'Rathann' Mierzejewski 2018-08-20 10:10:51 UTC
(In reply to Richard W.M. Jones from comment #1)
> Back in 2015 we switched from CBLAS to Atlas because the performance
> was supposed to be better:
> 
> https://lists.fedoraproject.org/pipermail/devel/2015-February/thread.
> html#208146
> 
> Has this advice changed?

No, ATLAS was and still is faster than CBLAS (the original one from netlib).

> Is CBLAS the same as OpenBLAS?

No. OpenBLAS is a competing optimized implementation based on GotoBLAS. It's actively maintained and has advantages over ATLAS in terms of runtime code path selection and performance which are attractive to Fedora.

> (If only there was just one numeric library ...)

There's also binary-only MKL (from Intel) and something similar from AMD. ;)

(In reply to Richard W.M. Jones from comment #2)
> Also is GSL different from BLAS?

Yes. 

> Uses BLAS?

Yes, but the implementation must be selected at link time:
http://www.gnu.org/software/gsl/manual/html_node/Linking-with-an-alternative-BLAS-library.html
Also see bug #1007058.

> (Imagine I know nothing about this topic at all when answering)

Got it. :)

(In reply to Richard W.M. Jones from comment #3)
> Proposed fix:
> https://koji.fedoraproject.org/koji/taskinfo?taskID=29195993
> 
> This is now linking using:
> 
> -lgsl -lopenblas -lm

Thank you.

Comment 5 Richard W.M. Jones 2018-08-20 11:11:46 UTC
OK, thanks for the comprehensive answer, let's assume this is
fixed unless someone finds otherwise.


Note You need to log in before you can comment on or make changes to this bug.