-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Fix Base.libblas_name
/Base.liblapack_name
#48435
Conversation
base/Base.jl
Outdated
const libblas_name = "libblastrampoline" * (Sys.iswindows() ? "-5" : "") | ||
const liblapack_name = libblas_name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we somehow mark this as deprecated and instead tell this list of packages that they should use libblastrampoline_jll.libblastrampoline
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you deprecate a variable (that is, with a nice warning when you try to access it)? And I'm not sure that's a future-proof option, in case we come up with yet another blas idea in the future, Base.libblas_name
looks more agnostic.
I added a test for the use of |
Ehr, does anyone know what would cause
This is in the newly added test, it fails only on 64-bit Windows.... |
Using the 64-bit Windows build in this PR, I tried to run using LinearAlgebra, Libdl
dot_sym = dlsym(dlopen(Base.libblas_name), "cblas_ddot" * (Sys.WORD_SIZE == 64 ? "64_" : ""))
@ccall $(dot_sym)(2::Cint, [2.0, 3.0]::Ref{Cdouble}, 1::Cint, [4.0, 5.0]::Ref{Cdouble}, 1::Cint)::Cdouble under Wine and it worked fine for me, so I have no clue of what's going on here. I'm happy to change the test to something else if someone can suggest something which doesn't crash on Windows. |
The problem is that on 64-bit systems, you need to pass the integers as |
On Windows they need to include the major soversion of libblastrampoline.
Use `Int` as type for integer arguments, instead of `Cint`.
That worked, thanks! netlib documentation isn't very helpful, I found the signature of #define CBLAS_INT int32_t 🤷 |
Right, but that’s for an LP64 build. ILP64 means defining CBLSS_INT to be int64_t. I myself have caused such issues dozens of times in the past. It’s easy to forget. :P |
On Windows they need to include the major soversion of libblastrampoline.
Fix JuliaLang/LinearAlgebra.jl#981.