libmuscle.checkpoint_triggers module
- class libmuscle.checkpoint_triggers.AtCheckpointTrigger(at_rules: List[CheckpointAtRule])[source]
Bases:
CheckpointTrigger
Represents a trigger based on an “at” checkpoint rule
This triggers at the specified times.
- class libmuscle.checkpoint_triggers.CheckpointTrigger[source]
Bases:
object
Represents a trigger for creating snapshots
- class libmuscle.checkpoint_triggers.CombinedCheckpointTriggers(checkpoint_rules: List[CheckpointRule])[source]
Bases:
CheckpointTrigger
Checkpoint trigger based on a combination of “at” and “ranges”
- class libmuscle.checkpoint_triggers.RangeCheckpointTrigger(range: CheckpointRangeRule)[source]
Bases:
CheckpointTrigger
Represents a trigger based on a “ranges” checkpoint rule
This triggers at a range of checkpoint moments.
Equivalent an “at” rule
[start, start + step, start + 2*step, ...]
for as long asstart + i*step <= stop
.Stop may be omitted, in which case the range is infinite.
Start may be omitted, in which case the range is equivalent to an “at” rule
[..., -n*step, ..., -step, 0, step, 2*step, ...]
for as long asi*step <= stop
.
- class libmuscle.checkpoint_triggers.TriggerManager[source]
Bases:
object
Manages all checkpoint triggers and checks if a snapshot must be saved.
- get_triggers() List[str] [source]
Get trigger description(s) for the current reason for checkpointing.
- harmonise_wall_time(at_least: float) None [source]
Ensure our elapsed time is at least the given value
- set_checkpoint_info(elapsed: float, checkpoints: Checkpoints) None [source]
Register checkpoint info received from the muscle manager.