Skip to content

Commit

Permalink
Support older names
Browse files Browse the repository at this point in the history
  • Loading branch information
staticfloat committed Sep 20, 2022
1 parent 0a30f64 commit 5cc0dfb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion stdlib/OpenBLAS_jll/src/OpenBLAS_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ function __init__()
# Ensure that OpenBLAS does not grab a huge amount of memory at first,
# since it instantly allocates scratch buffer space for the number of
# threads it thinks it needs to use.
if !haskey(ENV, "OPENBLAS_NUM_THREADS")
# X-ref: https://github.com/xianyi/OpenBLAS/blob/c43ec53bdd00d9423fc609d7b7ecb35e7bf41b85/README.md#setting-the-number-of-threads-using-environment-variables
# X-ref: https://github.com/JuliaLang/julia/issues/45434
if !haskey(ENV, "OPENBLAS_NUM_THREADS") &&
!haskey(ENV, "GOTO_NUM_THREADS") &&
!haskey(ENV, "OMP_NUM_THREADS")
# We set this to `1` here, and then LinearAlgebra will update
# to the true value in its `__init__()` function.
ENV["OPENBLAS_NUM_THREADS"] = "1"
Expand Down

0 comments on commit 5cc0dfb

Please sign in to comment.