From fe5a96ef48fb112c2b896d681272d024c3aaa0b0 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Wed, 29 Mar 2023 11:45:34 +0200 Subject: [PATCH] Choose parallel tests based on CPUs, not threads. --- test/runtests.jl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index fb610c0f..d70d5934 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -42,12 +42,12 @@ if do_help --help Show this text. --list List all available tests. --quickfail Fail the entire run as soon as a single test errored. - --jobs=N Launch `N` processes to perform tests (default: Threads.nthreads()). + --jobs=N Launch `N` processes to perform tests (default: Sys.CPU_THREADS). Remaining arguments filter the tests that will be executed.""") exit(0) end -_, jobs = extract_flag!(ARGS, "--jobs", Threads.nthreads()) +_, jobs = extract_flag!(ARGS, "--jobs", Sys.CPU_THREADS) do_quickfail, _ = extract_flag!(ARGS, "--quickfail") include("setup.jl") # make sure everything is precompiled @@ -55,6 +55,8 @@ include("setup.jl") # make sure everything is precompiled @info "Using oneAPI support library at " * oneAPI.Support.liboneapi_support +@info "Running $jobs tests in parallel. If this is too many, specify the `--jobs` argument to the tests, or set the JULIA_CPU_THREADS environment variable." + # choose tests const tests = [] const test_runners = Dict()