JuliaLinearAlgebra / libblastrampoline

Using PLT trampolines to provide a BLAS and LAPACK demuxing library.
MIT License
66 stars 17 forks source link

FlexiBLAS #69

Closed carstenbauer closed 2 years ago

carstenbauer commented 2 years ago

I tried to use FlexiBLAS as a BLAS/LAPACK backend for LBT. While lbt_forward seems to work (What does 2191 mean?) using it doesn't:

julia> libflexiblas = "/opt/software/pc2/EB-SW/software/FlexiBLAS/3.0.4-GCC-11.2.0/lib/libflexiblas.so"
"/opt/software/pc2/EB-SW/software/FlexiBLAS/3.0.4-GCC-11.2.0/lib/libflexiblas.so"

julia> using LinearAlgebra

julia> BLAS.lbt_forward(libflexiblas; clear=true)
2191

julia> BLAS.get_config()
LinearAlgebra.BLAS.LBTConfig
Libraries:
└ [ LP64] libflexiblas.so

julia> A = rand(1000,1000);

julia> A*A;
Error: no BLAS/LAPACK library loaded!

Why doesn't this work given that FlexiBLAS claims to have 100% compatibility with BLAS/LAPACK ABI/API?

giordano commented 2 years ago

Doesn't flexiblas do basically the same work as libblastrampoline?

What does 2191 mean?

The number of forwarded functions

carstenbauer commented 2 years ago

Yes, it does. But we already have some infrastructure around flexiblas that we might want to reuse.

staticfloat commented 2 years ago

The issue here is that you've loaded an LP64 library, but Julia natively uses ILP64. Try building FlexiBLAS in ILP64 mode, and loading it again.

ViralBShah commented 2 years ago

Let's reopen if still an issue after compiling FlexiBLAS with ILP64.