Skip to content

Commit 10dd606

Browse files
committed
Add num_batches guard
1 parent 028ab9d commit 10dd606

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/ensemble/basic_ensemble_solve.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ function __solve(prob::AbstractEnsembleProblem,
8585
pmap_batch_size = batch_size÷100 > 0 ? batch_size÷100 : 1, kwargs...)
8686

8787
num_batches = trajectories ÷ batch_size
88+
num_batches < 1 && error("trajectories ÷ batch_size cannot be less than 1, got $num_batches")
8889
num_batches * batch_size != trajectories && (num_batches += 1)
8990

9091
function batch_function(I)

0 commit comments

Comments
 (0)