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

use the correct liblapack name #15

Closed
wants to merge 1 commit into from

Conversation

KristofferC
Copy link

@KristofferC KristofferC commented Nov 14, 2023

We got reports of users segfaulting when BLAS functions in this module was called. This was debugged down into an inconsistency between Base.liblapack_name and LinearAlgebra.LAPACK.liblapack. The correct one to use is the latter and with that change the segfaults disappeared. Also note that the former might be removed (JuliaLang/julia#50699).

As a side note, some of the functions provided here are now available in LinearAlgebra itself, see for example JuliaLang/julia#32390.

@andreasvarga
Copy link
Owner

We got reports of users segfaulting when BLAS functions in this module was called.

Could you provide a link to this problematic? Are these segfaults occuring with OpenBLAS or with MKL?

I already planned a version bump to replace

Base.liblapack_name
with


@static if VERSION < v"1.7"
    using LinearAlgebra.LAPACK: liblapack
elseif VERSION < v"1.9"
    const liblapack = "libblastrampoline"
else
    const liblapack = LinearAlgebra.libblastrampoline
end

(see the discussion here).

Although I can fix the MKL compliance issue myself for MatrixPencils (by replacing some wrappers with Julia implementations of the same LAPACK codes), I decided to wait with the version bump until this PR will be merged.

@KristofferC
Copy link
Author

Could you provide a link to this problematic?

This was from a support issue with a customer. The issue they had was that they had managed to get rid of the symlinks between libtrampoline.so and libtrampoline.so.5. This means that the discrepancy between Base.liblapack_name and LinearAlgebra.LAPACK.liblapack caused that calling into MatrixPencils.jl would use a separate (but identical) library but this library would not have been initialized so any use of it would segfault.

So in some sense, this is right now only a problem in combination with another issue, but nonetheless I would say the behavior in here is more correct and since Base.lilbapack_name might go away, this is probably a good idea anyway.

@andreasvarga
Copy link
Owner

Should I go forward with my proposal or would you like a modified one?

@KristofferC
Copy link
Author

I think your suggestion is fine.

@andreasvarga
Copy link
Owner

OK, I will make a new release and also enforce MKL compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants