Skip to content

Version 0.5.0

Jonas Isensee requested to merge dynamicstate into dev
  • new feature: All information available within an evolve! call is now managed in a DynamicState structure. This enables full state dumps for seamless continuation of simulation runs.

  • new feature: The callback API has been extended by two new optional functions

    • freeze!(::AbstractCallback, ::DynamicState) is called on a callback instead of finalize when the simulation is prematurely interrupted
    • defrost!(::AbstractCallback) can be used when restoring callbacks from a dumped DynamicState
  • new feature: Three new callbacks are included with this version of InPartS

    • SignalHandlerCallback captures POSIX signals for graceful termination of evolve! calls. This callback lives in an extension and depends on InterProcessCommunication.jl being loaded
    • BinaryDumpCallback(trigger, filename): write a Serialization.serialize dump of the DynamicState when triggered and upon finalize! (and freeze!).
    • ExponentialBackoffCallback: A generic callback that triggers at first execution, then after max(max_interval, start_interval*factor^n) with n the amount of previous triggers. Starts back at n=0 after defrost!
  • new feature: the behaviour of the SaveCallback on encountering an already existing snapshot can now be specified

  • breaking: The callback API has been overhauled, introducing several breaking changes:

    • the meaning of callback return values has been changed: the only return values that do not terminate the simulation are nothing and a zero-value integer. All non-zero integers terminate the simulation, and will be returned by evolve!. No return values other than Integers and nothing are permitted.
    • the (pre|post)propagate and finalize hooks have been renamed (pre|post)propagate! and finalize! respectively and now operate on DynamicStates instead of Simulations
      • this does not apply to the user-provided functions in generic callbacks (e.g. PeriodicCallback), which generally still operate on Simulations
  • breaking: evolve! now returns an Integer return code (0 on regular tmax termination or any non-zero callback return code) and a DynamicState

  • breaking: the execution order in single-threaded force computation is changed to the striping pattern using in multi-threading, thus simulation results should now be consistent independent of threading

  • breaking: The offset parameter in RealTimeCallbacks is now given in seconds relative to the first prepropagate! call.\

  • bugfix: Access to sim.rng is now type-stable, which should speed up simulations that rely on frequent random number generation.

  • deprecation: CallbackSet is deprecated in favour of CallbackList which has a semantic ordering to the callback execution and uses early termination when a callback has a non-nothing return value.

Edited by Lukas Hupe

Merge request reports