Skip to content

Commit

Permalink
Merge pull request #866 from mimiframework/speedup-mcs
Browse files Browse the repository at this point in the history
Improve memory efficiency
  • Loading branch information
davidanthoff authored Oct 27, 2021
2 parents 2d9bb57 + 356efb1 commit bdeef92
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/mcs/montecarlo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,10 @@ function Base.run(sim_def::SimulationDef{T},
post_trial_func(sim_inst, trialnum, ntimesteps, tup)
end

_store_trial_results(sim_inst, trialnum, scen_name, results_output_dir, streams)
if results_in_memory || results_output_dir!==nothing
_store_trial_results(sim_inst, trialnum, scen_name, results_output_dir, streams)
end

_restore_sim_params!(sim_inst, original_values)

counter += 1
Expand Down

0 comments on commit bdeef92

Please sign in to comment.