Skip to content

Commit 70520cf

Browse files
author
KristofferC
committed
set number of openblas threads to 1 while precompiling
1 parent 35191ad commit 70520cf

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

base/loading.jl

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1684,12 +1684,14 @@ function create_expr_cache(pkg::PkgId, input::String, output::String, concrete_d
16841684
deps_eltype = sprint(show, eltype(concrete_deps); context = :module=>nothing)
16851685
deps = deps_eltype * "[" * join(deps_strs, ",") * "]"
16861686
trace = isassigned(PRECOMPILE_TRACE_COMPILE) ? `--trace-compile=$(PRECOMPILE_TRACE_COMPILE[])` : ``
1687-
io = open(pipeline(`$(julia_cmd()::Cmd) -O0
1688-
--output-ji $output --output-incremental=yes
1689-
--startup-file=no --history-file=no --warn-overwrite=yes
1690-
--color=$(have_color === nothing ? "auto" : have_color ? "yes" : "no")
1691-
$trace
1692-
-`, stderr = internal_stderr, stdout = internal_stdout),
1687+
io = open(pipeline(addenv(`$(julia_cmd()::Cmd) -O0
1688+
--output-ji $output --output-incremental=yes
1689+
--startup-file=no --history-file=no --warn-overwrite=yes
1690+
--color=$(have_color === nothing ? "auto" : have_color ? "yes" : "no")
1691+
$trace
1692+
-`,
1693+
"OPENBLAS_NUM_THREADS" => 1),
1694+
stderr = internal_stderr, stdout = internal_stdout),
16931695
"w", stdout)
16941696
# write data over stdin to avoid the (unlikely) case of exceeding max command line size
16951697
write(io.in, """

0 commit comments

Comments
 (0)