Skip to content

Commit

Permalink
set number of openblas threads to 1 while precompiling (#46792)
Browse files Browse the repository at this point in the history
(cherry picked from commit b6d2434)
  • Loading branch information
KristofferC authored and KristofferC committed Sep 20, 2022
1 parent 6bfa51f commit 39ae07c
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1587,12 +1587,14 @@ function create_expr_cache(pkg::PkgId, input::String, output::String, concrete_d
deps_eltype = sprint(show, eltype(concrete_deps); context = :module=>nothing)
deps = deps_eltype * "[" * join(deps_strs, ",") * "]"
trace = isassigned(PRECOMPILE_TRACE_COMPILE) ? `--trace-compile=$(PRECOMPILE_TRACE_COMPILE[])` : ``
io = open(pipeline(`$(julia_cmd()::Cmd) -O0
--output-ji $output --output-incremental=yes
--startup-file=no --history-file=no --warn-overwrite=yes
--color=$(have_color === nothing ? "auto" : have_color ? "yes" : "no")
$trace
-`, stderr = internal_stderr, stdout = internal_stdout),
io = open(pipeline(addenv(`$(julia_cmd()::Cmd) -O0
--output-ji $output --output-incremental=yes
--startup-file=no --history-file=no --warn-overwrite=yes
--color=$(have_color === nothing ? "auto" : have_color ? "yes" : "no")
$trace
-`,
"OPENBLAS_NUM_THREADS" => 1),
stderr = internal_stderr, stdout = internal_stdout),
"w", stdout)
# write data over stdin to avoid the (unlikely) case of exceeding max command line size
write(io.in, """
Expand Down

0 comments on commit 39ae07c

Please sign in to comment.