-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
The interactive use section seems to suggest that the following would work:
Using
using ParallelTestRunner
using MyPackage
testsuite = Dict("threads"=>:(@show Threads.nthreads()))
args = parse_args(ARGS)
runtests(MyPackage, args; testsuite)and calling
julia> Pkg.test("MyPackage", julia_args=`--threads=4`)one should be able to enable multiple threads on the workers. However, this doesn't seem to be the case.
Running 1 tests in parallel. If this is too many, specify the `--jobs=N` argument to the tests, or set the `JULIA_CPU_THREADS` environment variable.
│ │ ──────────────── CPU ──────────────── │
Test (Worker) │ Time (s) │ GC (s) │ GC % │ Alloc (MB) │ RSS (MB) │
threads (1) │ 0.17 │ 0.00 │ 0.0 │ 5.20 │ 409.45 │
Output generated during execution of 'threads':
[ Threads.nthreads() = 1
Test Summary: | Total Time
Overall | 0 11.1s
SUCCESS
Testing MyPackage tests passed What does work is creating a custom worker using addworker(; exeflags = ["--threads=4"]), but ideally I don't want to create a worker per test. Is there a way to pass the number of threads to the default workers? It seems
| push!(env, "JULIA_NUM_THREADS" => "1") |
1, and ParallelTestRunner.jl/src/ParallelTestRunner.jl
Line 1009 in 15115ec
| wrkr = p = addworker(; init_worker_code, io_ctx.color) |
exeflags. I would appreciate pointers on this.Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels