Skip to content

Commit

Permalink
Choose parallel tests based on CPUs, not threads.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Mar 29, 2023
1 parent 6b05f9a commit fe5a96e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,21 @@ 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
@info "System information:\n" * sprint(io->oneAPI.versioninfo(io))

@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()
Expand Down

0 comments on commit fe5a96e

Please sign in to comment.