Skip to content

Commit e8dba44

Browse files
committed
Support older names
1 parent f66db7d commit e8dba44

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

stdlib/OpenBLAS_jll/src/OpenBLAS_jll.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ function __init__()
4040
# Ensure that OpenBLAS does not grab a huge amount of memory at first,
4141
# since it instantly allocates scratch buffer space for the number of
4242
# threads it thinks it needs to use.
43-
if !haskey(ENV, "OPENBLAS_NUM_THREADS")
43+
# X-ref: https://github.com/xianyi/OpenBLAS/blob/c43ec53bdd00d9423fc609d7b7ecb35e7bf41b85/README.md#setting-the-number-of-threads-using-environment-variables
44+
# X-ref: https://github.com/JuliaLang/julia/issues/45434
45+
if !haskey(ENV, "OPENBLAS_NUM_THREADS") &&
46+
!haskey(ENV, "GOTO_NUM_THREADS") &&
47+
!haskey(ENV, "OMP_NUM_THREADS")
4448
# We set this to `1` here, and then LinearAlgebra will update
4549
# to the true value in its `__init__()` function.
4650
ENV["OPENBLAS_NUM_THREADS"] = "1"

0 commit comments

Comments
 (0)