Bug 2121388 - Linking to specific BLAS/LAPACK implementation
Summary: Linking to specific BLAS/LAPACK implementation
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: openmeeg
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Antonio T. sagitter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-08-25 10:54 UTC by Iñaki Ucar
Modified: 2022-08-28 16:41 UTC (History)
1 user (show)

Fixed In Version: openmeeg-2.5.5-1.fc38
Clone Of:
Environment:
Last Closed: 2022-08-28 16:35:19 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Proposed patch (2.01 KB, patch)
2022-08-27 10:33 UTC, Antonio T. sagitter
no flags Details | Diff

Description Iñaki Ucar 2022-08-25 10:54:34 UTC
The packaging guidelines establishes that BLAS/LAPACK-dependent packages MUST link against FlexiBLAS, instead of a specific implementation directly, so that this can be managed system-wide (see https://docs.fedoraproject.org/en-US/packaging-guidelines/BLAS_LAPACK/#_packaging_blaslapack_dependent_packages).

This was implemented as part of https://fedoraproject.org/wiki/Changes/FlexiBLAS_as_BLAS/LAPACK_manager,
but reverted in this commit: https://src.fedoraproject.org/rpms/openmeeg/c/512460b5406999bd3d9c3a9958981bd5840667f4?branch=rawhide

Please, revert back to linking to FlexiBLAS.

Comment 1 Antonio T. sagitter 2022-08-25 17:18:51 UTC
openmeeg is not optimized for Flexiblas, many tests failed.

Comment 2 Iñaki Ucar 2022-08-25 17:25:43 UTC
FlexiBLAS is a mere wrapper, there's nothing to "optimize". Test failures with the default backend (openblas-openmp in our case) are upstream issues as a result of comparisons with tolerances that are too tight. Upstream should fix those tests, but this rarely happens, so the workaround is to "export FLEXIBLAS=netlib" in the %check section, so that tests are performed against the reference implementation.

Comment 3 Iñaki Ucar 2022-08-25 17:26:14 UTC
BTW, this is also documented: https://docs.fedoraproject.org/en-US/packaging-guidelines/BLAS_LAPACK/#_tests

Comment 4 Antonio T. sagitter 2022-08-25 17:36:18 UTC
Okay, i will try to rebuild against Flexiblas this weekend.

Comment 5 Antonio T. sagitter 2022-08-27 10:33:49 UTC
Created attachment 1908021 [details]
Proposed patch

I'm using the attached patch to build latest release 2.5.5
It's failing with this error:

In file included from /home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/fast_sparse_matrix.h:10,
                 from /home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/src/fast_sparse_matrix.cpp:8:
/home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/OpenMEEGMathsConfig.h:49:2: warning: #warning "No blas/lapack implementation selected." [-Wcpp]
   49 | #warning "No blas/lapack implementation selected."
      |  ^~~~~~~
In file included from /home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/vector.h:15,
                 from /home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/fast_sparse_matrix.h:11:
/home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/linop.h:26:12: error: 'BLAS_INT' does not name a type
   26 |     inline BLAS_INT sizet_to_int(const unsigned& num) {
      |            ^~~~~~~~
In file included from /home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/sparse_matrix.h:16,
                 from /home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/fast_sparse_matrix.h:12:
/home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/matrix.h: In member function 'double OpenMEEG::Matrix::dot(const OpenMEEG::Matrix&) const':
/home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/matrix.h:455:16: error: 'sz' does not name a type
  455 |         const  sz = size();
      |                ^~
/home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/matrix.h:457:28: error: 'sz' was not declared in this scope; did you mean 's'?
  457 |         for (size_t i=0; i<sz; i++)
      |                            ^~
      |                            s
gmake[2]: *** [OpenMEEGMaths/CMakeFiles/OpenMEEGMaths.dir/build.make:135: OpenMEEGMaths/CMakeFiles/OpenMEEGMaths.dir/src/fast_sparse_matrix.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
In file included from /home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/linop.h:15,
                 from /home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/MathsIO.H:17,
                 from /home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/src/MathsIO.C:1:
/home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/OpenMEEGMathsConfig.h:49:2: warning: #warning "No blas/lapack implementation selected." [-Wcpp]
   49 | #warning "No blas/lapack implementation selected."
      |  ^~~~~~~
/home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/linop.h:26:12: error: 'BLAS_INT' does not name a type
   26 |     inline BLAS_INT sizet_to_int(const unsigned& num) {
      |            ^~~~~~~~
gmake[2]: *** [OpenMEEGMaths/CMakeFiles/OpenMEEGMaths.dir/build.make:149: OpenMEEGMaths/CMakeFiles/OpenMEEGMaths.dir/src/MathsIO.C.o] Error 1
In file included from /home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/src/symmatrix.cpp:13:
/home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/OpenMEEGMathsConfig.h:49:2: warning: #warning "No blas/lapack implementation selected." [-Wcpp]
   49 | #warning "No blas/lapack implementation selected."
      |  ^~~~~~~
In file included from /home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/matrix.h:15,
                 from /home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/src/symmatrix.cpp:14:
/home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/linop.h:26:12: error: 'BLAS_INT' does not name a type
   26 |     inline BLAS_INT sizet_to_int(const unsigned& num) {
      |            ^~~~~~~~
/home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/matrix.h: In member function 'double OpenMEEG::Matrix::dot(const OpenMEEG::Matrix&) const':
/home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/matrix.h:455:16: error: 'sz' does not name a type
  455 |         const  sz = size();
      |                ^~
/home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/matrix.h:457:28: error: 'sz' was not declared in this scope; did you mean 's'?
  457 |         for (size_t i=0; i<sz; i++)
      |                            ^~
      |                            s
gmake[2]: *** [OpenMEEGMaths/CMakeFiles/OpenMEEGMaths.dir/build.make:107: OpenMEEGMaths/CMakeFiles/OpenMEEGMaths.dir/src/symmatrix.cpp.o] Error 1
In file included from /home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/src/vector.cpp:8:
/home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/OpenMEEGMathsConfig.h:49:2: warning: #warning "No blas/lapack implementation selected." [-Wcpp]
   49 | #warning "No blas/lapack implementation selected."
      |  ^~~~~~~
In file included from /home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/vector.h:15,
                 from /home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/src/vector.cpp:9:
/home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/linop.h:26:12: error: 'BLAS_INT' does not name a type
   26 |     inline BLAS_INT sizet_to_int(const unsigned& num) {
      |            ^~~~~~~~
In file included from /home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/src/vector.cpp:10:
/home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/matrix.h: In member function 'double OpenMEEG::Matrix::dot(const OpenMEEG::Matrix&) const':
/home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/matrix.h:455:16: error: 'sz' does not name a type
  455 |         const  sz = size();
      |                ^~
/home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/matrix.h:457:28: error: 'sz' was not declared in this scope; did you mean 's'?
  457 |         for (size_t i=0; i<sz; i++)
      |                            ^~
      |                            s
gmake[2]: *** [OpenMEEGMaths/CMakeFiles/OpenMEEGMaths.dir/build.make:79: OpenMEEGMaths/CMakeFiles/OpenMEEGMaths.dir/src/vector.cpp.o] Error 1
In file included from /home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/linop.h:15,
                 from /home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/sparse_matrix.h:14,
                 from /home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/src/sparse_matrix.cpp:8:
/home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/OpenMEEGMathsConfig.h:49:2: warning: #warning "No blas/lapack implementation selected." [-Wcpp]
   49 | #warning "No blas/lapack implementation selected."
      |  ^~~~~~~
/home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/linop.h:26:12: error: 'BLAS_INT' does not name a type
   26 |     inline BLAS_INT sizet_to_int(const unsigned& num) {
      |            ^~~~~~~~
In file included from /home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/sparse_matrix.h:16:
/home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/matrix.h: In member function 'double OpenMEEG::Matrix::dot(const OpenMEEG::Matrix&) const':
/home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/matrix.h:455:16: error: 'sz' does not name a type
  455 |         const  sz = size();
      |                ^~
/home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/matrix.h:457:28: error: 'sz' was not declared in this scope; did you mean 's'?
  457 |         for (size_t i=0; i<sz; i++)
      |                            ^~
      |                            s
gmake[2]: *** [OpenMEEGMaths/CMakeFiles/OpenMEEGMaths.dir/build.make:121: OpenMEEGMaths/CMakeFiles/OpenMEEGMaths.dir/src/sparse_matrix.cpp.o] Error 1
In file included from /home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/matrix.h:10,
                 from /home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/src/matrix.cpp:13:
/home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/OpenMEEGMathsConfig.h:49:2: warning: #warning "No blas/lapack implementation selected." [-Wcpp]
   49 | #warning "No blas/lapack implementation selected."
      |  ^~~~~~~
In file included from /home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/matrix.h:15:
/home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/linop.h:26:12: error: 'BLAS_INT' does not name a type
   26 |     inline BLAS_INT sizet_to_int(const unsigned& num) {
      |            ^~~~~~~~
/home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/matrix.h: In member function 'double OpenMEEG::Matrix::dot(const OpenMEEG::Matrix&) const':
/home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/matrix.h:455:16: error: 'sz' does not name a type
  455 |         const  sz = size();
      |                ^~
/home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/matrix.h:457:28: error: 'sz' was not declared in this scope; did you mean 's'?
  457 |         for (size_t i=0; i<sz; i++)
      |                            ^~
      |                            s
gmake[2]: *** [OpenMEEGMaths/CMakeFiles/OpenMEEGMaths.dir/build.make:93: OpenMEEGMaths/CMakeFiles/OpenMEEGMaths.dir/src/matrix.cpp.o] Error 1
In file included from /home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/linop.h:15,
                 from /home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/MathsIO.H:17,
                 from /home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/MatlabIO.H:13,
                 from /home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/src/MatlabIO.C:8:
/home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/OpenMEEGMathsConfig.h:49:2: warning: #warning "No blas/lapack implementation selected." [-Wcpp]
   49 | #warning "No blas/lapack implementation selected."
      |  ^~~~~~~
/home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/linop.h:26:12: error: 'BLAS_INT' does not name a type
   26 |     inline BLAS_INT sizet_to_int(const unsigned& num) {
      |            ^~~~~~~~
In file included from /home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/sparse_matrix.h:16,
                 from /home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/MatlabIO.H:14:
/home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/matrix.h: In member function 'double OpenMEEG::Matrix::dot(const OpenMEEG::Matrix&) const':
/home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/matrix.h:455:16: error: 'sz' does not name a type
  455 |         const  sz = size();
      |                ^~
/home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/OpenMEEGMaths/include/matrix.h:457:28: error: 'sz' was not declared in this scope; did you mean 's'?
  457 |         for (size_t i=0; i<sz; i++)
      |                            ^~
      |                            s
gmake[2]: *** [OpenMEEGMaths/CMakeFiles/OpenMEEGMaths.dir/build.make:163: OpenMEEGMaths/CMakeFiles/OpenMEEGMaths.dir/src/MatlabIO.C.o] Error 1
gmake[2]: Leaving directory '/home/sagitter/rpmbuild/BUILD/openmeeg-2.5.5/redhat-linux-build'
gmake[1]: *** [CMakeFiles/Makefile2:1073: OpenMEEGMaths/CMakeFiles/OpenMEEGMaths.dir/all] Error 2

Comment 7 Fedora Update System 2022-08-28 16:34:22 UTC
FEDORA-2022-e5fb55e52a has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2022-e5fb55e52a

Comment 8 Fedora Update System 2022-08-28 16:35:19 UTC
FEDORA-2022-e5fb55e52a has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 9 Antonio T. sagitter 2022-08-28 16:41:01 UTC
Thank you Inaki


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