Skip to content

Commit 6d90a23

Browse files
Update src/ensemble/basic_ensemble_solve.jl
Co-authored-by: Yingbo Ma <[email protected]>
1 parent 63b9315 commit 6d90a23

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ensemble/basic_ensemble_solve.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ function __solve(prob::AbstractEnsembleProblem,
101101
converged::Bool = false
102102

103103
batch_data = batch_function(I)
104-
u = similar(batch_data, 0)
104+
u = prob.u_init === nothing ? similar(batch_data, 0) : prob.u_init
105105
u,converged = prob.reduction(u,batch_data,I)
106106
elapsed_time = @elapsed for i in 2:num_batches
107107
converged && break

0 commit comments

Comments
 (0)