-
Notifications
You must be signed in to change notification settings - Fork 5
Description
A general purpose mechanism to checkpoint and restore a simulation, including all of its simulation objects and the state of the simulation will be hard to build.
The easy part will be a mechanism to checkpoint and restore simulation objects whose attributes are all elementary datatypes or collections of elementary datatypes. Then a get_state method could package up the state of a running instance of the class and a restore_state(checkpointed_state) method could restore the state.
But many potential parts of a simulation might not be collections of elementary datatypes. These include:
- References to methods and functions
- Open file handles, network sockets, etc.
- Running subprocesses
These are all hard to checkpoint and restore because it is difficult to obtain the entirety of their states, and it is difficult to restore their states.
We defer this functionality until it is needed.