Skip to content

Commit 9fb8eb8

Browse files
fix tests
1 parent 7b2073a commit 9fb8eb8

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

test/distributed.jl

+9-10
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,23 @@ using Distributed
33
addprocs(2)
44

55
@everywhere using ModelingToolkit, OrdinaryDiffEq
6-
using
76

87
# create the Lorenz system
9-
@parameters t σ ρ β
10-
@variables x(t) y(t) z(t)
11-
@derivatives D'~t
8+
@everywhere @parameters t σ ρ β
9+
@everywhere @variables x(t) y(t) z(t)
10+
@everywhere @derivatives D'~t
1211

13-
eqs = [D(x) ~ σ*(y-x),
12+
@everywhere eqs = [D(x) ~ σ*(y-x),
1413
D(y) ~ x*-z)-y,
1514
D(z) ~ x*y - β*z]
1615

17-
de = ODESystem(eqs)
18-
ode_func = ODEFunction(de, [x,y,z], [σ, ρ, β])
16+
@everywhere de = ODESystem(eqs)
17+
@everywhere ode_func = ODEFunction(de, [x,y,z], [σ, ρ, β])
1918

20-
u0 = [19.,20.,50.]
21-
params = [16.,45.92,4]
19+
@everywhere u0 = [19.,20.,50.]
20+
@everywhere params = [16.,45.92,4]
2221

23-
ode_prob = ODEProblem(ode_func, u0, (0., 10.),params)
22+
@everywhere ode_prob = ODEProblem(ode_func, u0, (0., 10.),params)
2423

2524
@everywhere begin
2625

0 commit comments

Comments
 (0)