UncertaintyQuantification.jl icon indicating copy to clipboard operation
UncertaintyQuantification.jl copied to clipboard

Saving the state of subset simulation

Open AnderGray opened this issue 1 year ago • 4 comments

Often, when running subset simulation on HPC, the algorithm can get quite far (many levels) and then can fail due to a simulation crashing.

After fixing, we need to restart, and this is resource inefficient. It would be useful if we could save the state of the algorithm at every (successful) iteration, and reload this state if it crashes and we need to continue.

Perhaps all we need to do is save the samples and performance DataFrames in the main loop?

This is also useful for initialising the algorithm, as all the subset methods begin with a Monte Carlo sample.

AnderGray avatar May 07 '24 16:05 AnderGray

This might be something worth having for all simulations. Running a large MC simulation with SLURM could for example also benefit from a restart with data if something goes wrong. Requires some thought for a good system.

FriesischScott avatar May 07 '24 16:05 FriesischScott

Yes, ideally in the most non-intrusive way possible.

One suggestion (but quite intrusive) is to replace the for loop with while i <= sim.levels, and save the i, samples and performance (and sim?) at each iteration, with a user option of passing a saved state to the probability_of_failure function.

AnderGray avatar May 08 '24 13:05 AnderGray

Yes, ideally in the most non-intrusive way possible.

One suggestion (but quite intrusive) is to replace the for loop with while i <= sim.levels, and save the i, samples and performance (and sim?) at each iteration, with a user option of passing a saved state to the probability_of_failure function.

I'm getting Vietnam flashbacks of the SimulationData in Cossan 🙈

FriesischScott avatar Aug 06 '24 09:08 FriesischScott