Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LinearAlgebra] BLAS backend and update-alternatives #595

Closed
cdluminate opened this issue Jan 13, 2019 · 3 comments
Closed

[LinearAlgebra] BLAS backend and update-alternatives #595

cdluminate opened this issue Jan 13, 2019 · 3 comments
Labels
system:linux Affects only Linux

Comments

@cdluminate
Copy link
Contributor

cdluminate commented Jan 13, 2019

I'm raising the same topic as #27 again.

Debian family (including Ubuntu) highlights a feature named update-alternatives, which is used to switch symbol links between different providers. For example, any user could change the default BLAS/LAPACK backend as described here[1].

With this feature, many packages such as octave, numpy could switch BLAS backend smoothly because /usr/lib/x86_64-linux-gnu/libblas.so{,.3} is a symbol link managed by update-alternatives. Julia could also take advantage of this mechanism. However, when I'm trying to switch the underlying BLAS backend from openblas to MKL, this warning occurred. Then I disabled this feature for Debian's julia package.

The concerns about switching BLAS backend like this also includes ILP64 (as mentioned here: #27 ). The good news is that I'm working on Debian's BLAS64/LAPACK64 packages (bottom part of [1]), so the index length is not expected to be a problem if Julia is linked against BLAS64. Currently (in Debian archive) there are MKL and BLIS providing BLAS64 API/ABI.

Last but not least, this is a legal way to distribute pre-built Julia which could work with MKL without recompilation.

[1] https://wiki.debian.org/DebianScience/LinearAlgebraLibraries

@ViralBShah
Copy link
Member

Right - the Julia blas interface tries to guess which vendor BLAS it is and tries to query for information accordingly. The update-alternatives is defeating that detection:

https://github.com/JuliaLang/julia/blob/8aeb398aff2e05c026a4d41568653b33c5ec4c89/stdlib/LinearAlgebra/src/LinearAlgebra.jl#L418

@ViralBShah ViralBShah added the system:linux Affects only Linux label Aug 6, 2019
@ViralBShah
Copy link
Member

We probably should have a more robust way to detect the blas. Perhaps check for presence of vendor specific symbol names.

@ViralBShah
Copy link
Member

Going with FlexiBLAS should ideally fix this on all platforms in a much nicer way. Closing this in favour of that.

@KristofferC KristofferC transferred this issue from JuliaLang/julia Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
system:linux Affects only Linux
Projects
None yet
Development

No branches or pull requests

2 participants