Skip to content

make sure 1 thread is used in julia processes #1041

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/PackageCompiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ function create_fresh_base_sysimage(stdlibs::Vector{String}; cpu_target::String,
spinner = TerminalSpinners.Spinner(msg = "PackageCompiler: creating compiler .ji image (incremental=false)")
TerminalSpinners.@spin spinner begin
# Create corecompiler.ji
cmd = `$(get_julia_cmd()) --cpu-target $cpu_target
cmd = `$(get_julia_cmd()) --threads=1 --cpu-target $cpu_target
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unnecessary (see #1042)

--output-ji $tmp_corecompiler_ji $sysimage_build_args
$compiler_source_path $compiler_args`
@debug "running $cmd"
Expand All @@ -264,7 +264,7 @@ function create_fresh_base_sysimage(stdlibs::Vector{String}; cpu_target::String,
new_sysimage_source_path = joinpath(tmp, "sysimage_packagecompiler_$(uuid1()).jl")
write(new_sysimage_source_path, new_sysimage_content)
try
cmd = addenv(`$(get_julia_cmd()) --cpu-target $cpu_target
cmd = addenv(`$(get_julia_cmd()) --threads=1 --cpu-target $cpu_target
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unnecessary (see #1042)

--sysimage=$tmp_corecompiler_ji
$sysimage_build_args --output-o=$tmp_sys_o
$new_sysimage_source_path $compiler_args`,
Expand Down Expand Up @@ -462,7 +462,7 @@ function create_sysimg_object_file(object_file::String,
write(outputo_file, julia_code)
# Read the input via stdin to avoid hitting the maximum command line limit

cmd = `$(get_julia_cmd()) --cpu-target=$cpu_target $sysimage_build_args
cmd = `$(get_julia_cmd()) --threads=1 --cpu-target=$cpu_target $sysimage_build_args
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix is incomplete. If --threads=… or -t=… is set in sysimage_build_args it will override --threads=1, triggering the bug again.

--sysimage=$base_sysimage --project=$project --output-o=$(object_file)
$outputo_file`
@debug "running $cmd"
Expand Down
Loading