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

Bad default number of BLAS threads on 1.9? #976

Closed
KristofferC opened this issue Dec 31, 2022 · 1 comment · Fixed by JuliaLang/julia#48064
Closed

Bad default number of BLAS threads on 1.9? #976

KristofferC opened this issue Dec 31, 2022 · 1 comment · Fixed by JuliaLang/julia#48064

Comments

@KristofferC
Copy link
Member

Something looks strange with the number of BLAS threads on 1.9, I think.

julia> VERSION
v"1.9.0-beta2"

julia> LinearAlgebra.BLAS.get_num_threads()
1
julia> VERSION
v"1.8.4"

julia> LinearAlgebra.BLAS.get_num_threads()
8

This should just be with everything default.

cc @staticfloat

@KristofferC
Copy link
Member Author

KristofferC commented Dec 31, 2022

Seems to be JuliaLang/julia#46844. I don't really understand how that was supposed to work. If we set ENV["OPENBLAS_NUM_THREADS"] = "1" then LinearAlgebra.__init__() will not set the number of threads:

https://github.com/JuliaLang/julia/blob/516b097bd705faf628a3346c39279a595ab633d3/stdlib/LinearAlgebra/src/LinearAlgebra.jl#L642-L648

The reason 1.8 is still ok is because OpenBLAS_jll is not in the sysimage on 1.8 (but it is on 1.9).

OPENBLAS_DEFAULT_NUM_THREADS was added in OpenMathLib/OpenBLAS#3773 with a reference to JuliaLang/julia#46844 but it isn't used here. Maybe just a typo?

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 a pull request may close this issue.

1 participant