diff --git a/base/Base.jl b/base/Base.jl index e4c65b3493cba..1ca3c16deb24b 100644 --- a/base/Base.jl +++ b/base/Base.jl @@ -462,18 +462,9 @@ end if is_primary_base_module function __init__() # try to ensuremake sure OpenBLAS does not set CPU affinity (#1070, #9639) - if !haskey(ENV, "OPENBLAS_MAIN_FREE") && !haskey(ENV, "GOTOBLAS_MAIN_FREE") + if !haskey(ENV, "OPENBLAS_MAIN_FREE") ENV["OPENBLAS_MAIN_FREE"] = "1" end - # And try to prevent openblas from starting too many threads, unless/until specifically requested - if !haskey(ENV, "OPENBLAS_NUM_THREADS") && !haskey(ENV, "OMP_NUM_THREADS") - cpu_threads = Sys.CPU_THREADS::Int - if cpu_threads > 8 # always at most 8 - ENV["OPENBLAS_NUM_THREADS"] = "8" - elseif haskey(ENV, "JULIA_CPU_THREADS") # or exactly as specified - ENV["OPENBLAS_NUM_THREADS"] = cpu_threads - end # otherwise, trust that openblas will pick CPU_THREADS anyways, without any intervention - end # for the few uses of Libc.rand in Base: Libc.srand() # Base library init diff --git a/stdlib/Distributed/test/distributed_exec.jl b/stdlib/Distributed/test/distributed_exec.jl index 749c18f6b61f0..32b6b703f35e8 100644 --- a/stdlib/Distributed/test/distributed_exec.jl +++ b/stdlib/Distributed/test/distributed_exec.jl @@ -1031,7 +1031,6 @@ function test_add_procs_threaded_blas() @warn "Skipping blas num threads tests due to unsupported blas version" return end - @test master_blas_thread_count <= 8 # check that Base set the environment variable in __init__ before LinearAlgebra dlopen'd it # Test with default enable_threaded_blas false processes_added = addprocs_with_testenv(2)