Skip to content

Commit

Permalink
cmdlineargs test: on 32-bit systems, impose a constant upper limit on…
Browse files Browse the repository at this point in the history
… the number of threads (#39854)
  • Loading branch information
DilumAluthge authored Feb 28, 2021
1 parent f2b5b6e commit c79309b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/cmdlineargs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@ let exename = `$(Base.julia_cmd()) --startup-file=no --color=no`
# We want to test oversubscription, but on manycore machines, this can
# actually exhaust limited PID spaces
cpu_threads = max(2*cpu_threads, min(50, 10*cpu_threads))
if Sys.WORD_SIZE == 32
cpu_threads = min(cpu_threads, 50)
end
@test read(`$exename -t $cpu_threads -e $code`, String) == string(cpu_threads)
withenv("JULIA_NUM_THREADS" => string(cpu_threads)) do
@test read(`$exename -e $code`, String) == string(cpu_threads)
Expand Down

0 comments on commit c79309b

Please sign in to comment.