mpimd-csc / flexiblas

FlexiBLAS - A BLAS and LAPACK wrapper library with runtime exchangeable backends. This is only a mirror of https://gitlab.mpi-magdeburg.mpg.de/software/flexiblas-release
https://www.mpi-magdeburg.mpg.de/projects/flexiblas
GNU Lesser General Public License v3.0
36 stars 7 forks source link

Cannot load the backend completely #52

Closed Enchufa2 closed 3 months ago

Enchufa2 commented 3 months ago

Unfortunately, the scratch build for v3.4.3 fails. I see:

...
flexiblas Can not load zunmr3
flexiblas Can not load zunmrq
flexiblas Can not load zunmrz
flexiblas Can not load zunmtr
flexiblas Can not load zupgtr
flexiblas Can not load zupmtr
flexiblas  Failed to load the backend completely, some BLAS functions are missing. Abort!

CMake Error at /builddir/build/BUILD/flexiblas-3.4.3/test/blas/cblas/runtest.cmake:43 (message):
  Test /builddir/build/BUILD/flexiblas-3.4.3/build64/test/blas/cblas/xzcblat3
  returned Subprocess aborted
...

Build logs (click on any arch, then access the build.log): https://koji.fedoraproject.org/koji/taskinfo?taskID=118011037

grisuthedragon commented 3 months ago

I figured out why this happens. In order to get the rid of the lto-warnings (See #51) I have to change the way, how symbols from predefined BLAS and LAPACK implementations have to be integrated and this crashes. I am working on a solution.

EDIT: And the compiler's optimization procedure removed the remaining references.

grisuthedragon commented 3 months ago

Done in 3.4.4.

Enchufa2 commented 3 months ago

Great! Good news:

Bad news:

I see:

-- Search for ATLAS
-- Could NOT find BLAS (missing: BLAS_LIBRARIES)

then

-- Interface to Extra BLAS Libraries:
--  /usr/lib64/libopenblas.so - OpenBLASSerial 
--  /usr/lib64/libopenblasp.so - OpenBLASPThread 
--  /usr/lib64/libopenblaso.so - OpenBLASOpenMP 
--  /usr/lib64/libblis.so - BlisSerial 
--  /usr/lib64/libblisp.so - BlisPThread 
--  /usr/lib64/libbliso.so - BlisOpenMP 
-- Default BLAS: NETLIB

and finally (and obviously)

Processing files: flexiblas-atlas-3.4.4-1.fc41.x86_64
error: File not found: /builddir/build/BUILDROOT/flexiblas-3.4.4-1.fc41.x86_64/etc/flexiblasrc.d/atlas.conf
error: File not found: /builddir/build/BUILDROOT/flexiblas-3.4.4-1.fc41.x86_64/usr/lib64/flexiblas/libflexiblas_atlas.so
Enchufa2 commented 3 months ago

(BTW you can check in the root.log that atlas-devel is installed)

grisuthedragon commented 3 months ago

D'oh

Enchufa2 commented 3 months ago

I noted just now that this was the case also in the previous build for v3.4.3 at the top of this thread. Only that we didn't reach that point in the build because the tests failed.

grisuthedragon commented 3 months ago

I found the reason. Some when after the release of 3.4.2 I removed my own FindBLAS.cmake since the one provides by cmake is gotten much better. The biggest difference is, that finding ATLAS now has to fulfill the following CMAKE code:

if(BLA_VENDOR STREQUAL "ATLAS" OR BLA_VENDOR STREQUAL "All")
  if(NOT BLAS_LIBRARIES)
    check_blas_libraries(
      BLAS_LIBRARIES
      BLAS
      dgemm
      ""
      "blas;f77blas;atlas"
      ""
      ""
      ""
      )
  endif()
endif()

So the library needs to be named blas, f77blas or atlas. But the ones that are installed by atlas-devel are satlas (serial) and tatlas (threaded). So from the point of using a the stuff provided by cmake it is clear that it could not be found.

For FlexiBLAS, one just can add

-DEXTRA="ATLAS;ATLASSERIAL" -DATLAS_LIBRARY="/usr/lib64/atlas/libtatlas.so" -DATLASSERIAL_LIBRARY="/usr/lib64/atlas/libsatlas.so"

to the cmake call and ATLAS as well as its serial version is now found.

Enchufa2 commented 3 months ago

Perfect, thanks, I'll do that, and maybe try to send our library names upstream to cmake.

Enchufa2 commented 3 months ago

New scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=118071420 We have test errors in i686: https://kojipkgs.fedoraproject.org//work/tasks/1502/118071502/build.log

 19/115 Test  #19: CBLAS-xccblat1 ...................***Failed    1.61 sec
 69/115 Test  #70: LAPACK-xlintstc_ctest_in .........***Failed    1.64 sec
 72/115 Test  #73: LAPACK-xeigtstc_sep_in ...........***Failed    1.63 sec
 73/115 Test  #74: LAPACK-xeigtstc_se2_in ...........***Failed    1.62 sec
 75/115 Test  #76: LAPACK-xeigtstc_cec_in ...........***Failed    6.26 sec
 76/115 Test  #77: LAPACK-xeigtstc_ced_in ...........***Failed  160.92 sec
 79/115 Test  #80: LAPACK-xeigtstc_csb_in ...........***Failed    1.64 sec
 80/115 Test  #81: LAPACK-xeigtstc_csg_in ...........***Failed    1.62 sec

All ~except for #77~ are segfaults.

grisuthedragon commented 2 months ago

Can we remove i686 ;-) After few days of thinking I have an idea.

Enchufa2 commented 2 months ago

Good news: if you want to stop supporting i686, I can drop it, see https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval

grisuthedragon commented 2 months ago

I would try to support it until the next FlexiBLAS major release, whenever it happen ;-)