File tree 2 files changed +9
-10
lines changed
2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -5,17 +5,16 @@ using ParallelProcessingTools
5
5
6
6
using Distributed
7
7
8
- if length (workers ()) < 2
9
- addprocs (2 , exename = ParallelProcessingTools. mtjulia_exe ())
10
- end
11
-
12
8
13
- @testset " distexec " begin
9
+ @testset " onprocs " begin
14
10
@testset " worker-init" begin
11
+ if length (workers ()) < 2
12
+ @test addprocs (2 , exename = ParallelProcessingTools. mtjulia_exe ()) == [2 , 3 ]
13
+ end
15
14
@test length (workers ()) >= 2
16
15
end
17
16
18
- @testset " onprocs" begin
17
+ @testset " macro onprocs" begin
19
18
@everywhere using ParallelProcessingTools, Base. Threads
20
19
21
20
@test (@onprocs workers () myid ()) == workers ()
Original file line number Diff line number Diff line change @@ -6,12 +6,12 @@ using ParallelProcessingTools
6
6
using Base. Threads
7
7
8
8
9
- @testset " distexec " begin
10
- @testset " threads-init " begin
11
- @test nthreads () >= 2
9
+ @testset " onthreads " begin
10
+ if nthreads () < 2
11
+ @warn " JULIA multithreading not enabled "
12
12
end
13
13
14
- @testset " onprocs " begin
14
+ @testset " macro onthreads " begin
15
15
@test (begin
16
16
tl = ThreadLocal (0 )
17
17
@onthreads allthreads () tl[] = threadid ()
You can’t perform that action at this time.
0 commit comments