Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add batch_size test #351

Merged
merged 2 commits into from
Oct 21, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions test/downstream/ensemble.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,21 @@ prob = prob_sde_2Dlinear
prob2 = EnsembleProblem(prob)
sim = solve(prob2,SRIW1(),dt=1//2^(3),trajectories=10)

@test sim[1] isa DiffEqBase.RODESolution
@test sim[1,2] isa Matrix
@test sim[1,2,1] isa Float64

# Test Deprecations
@test_logs (:warn, "num_monte has been replaced by trajectories") (:warn, "parallel_type has been deprecated. Please refer to the docs for the new dispatch-based system.") solve(prob2,SRIW1(),dt=1//2^(3),num_monte=10,parallel_type=:threads)

sim = solve(prob2,SRIW1(),EnsembleThreads(),dt=1//2^(3),trajectories=10)
err_sim = DiffEqBase.calculate_ensemble_errors(sim;weak_dense_errors=true)
@test length(sim) == 10

sim = solve(prob2,SRIW1(),EnsembleThreads(),dt=1//2^(3),trajectories=10,batch_size=2)
err_sim = DiffEqBase.calculate_ensemble_errors(sim;weak_dense_errors=true)
@test length(sim) == 10

sim = solve(prob2,SRIW1(),EnsembleThreads(),dt=1//2^(3),adaptive=false,trajectories=10)
err_sim = DiffEqBase.calculate_ensemble_errors(sim;weak_timeseries_errors=true)

Expand Down