File tree Expand file tree Collapse file tree 2 files changed +1
-11
lines changed Expand file tree Collapse file tree 2 files changed +1
-11
lines changed Original file line number Diff line number Diff line change 462
462
if is_primary_base_module
463
463
function __init__ ()
464
464
# try to ensuremake sure OpenBLAS does not set CPU affinity (#1070, #9639)
465
- if ! haskey (ENV , " OPENBLAS_MAIN_FREE" ) && ! haskey ( ENV , " GOTOBLAS_MAIN_FREE " )
465
+ if ! haskey (ENV , " OPENBLAS_MAIN_FREE" )
466
466
ENV [" OPENBLAS_MAIN_FREE" ] = " 1"
467
467
end
468
- # And try to prevent openblas from starting too many threads, unless/until specifically requested
469
- if ! haskey (ENV , " OPENBLAS_NUM_THREADS" ) && ! haskey (ENV , " OMP_NUM_THREADS" )
470
- cpu_threads = Sys. CPU_THREADS:: Int
471
- if cpu_threads > 8 # always at most 8
472
- ENV [" OPENBLAS_NUM_THREADS" ] = " 8"
473
- elseif haskey (ENV , " JULIA_CPU_THREADS" ) # or exactly as specified
474
- ENV [" OPENBLAS_NUM_THREADS" ] = cpu_threads
475
- end # otherwise, trust that openblas will pick CPU_THREADS anyways, without any intervention
476
- end
477
468
# for the few uses of Libc.rand in Base:
478
469
Libc. srand ()
479
470
# Base library init
Original file line number Diff line number Diff line change @@ -1031,7 +1031,6 @@ function test_add_procs_threaded_blas()
1031
1031
@warn " Skipping blas num threads tests due to unsupported blas version"
1032
1032
return
1033
1033
end
1034
- @test master_blas_thread_count <= 8 # check that Base set the environment variable in __init__ before LinearAlgebra dlopen'd it
1035
1034
1036
1035
# Test with default enable_threaded_blas false
1037
1036
processes_added = addprocs_with_testenv (2 )
You can’t perform that action at this time.
0 commit comments