Checkpointing

A checkpointing actor can take user-defined checkpoints from current computations and restore them on demand.

Actors.checkpointingFunction
checkpointing(level=1, filename::AbstractString=""; kwargs...)

Start a checkpointing actor and return a Link to it.

Arguments

  • filename::AbstractString: filename where the actor should save its checkpointing buffer,
  • on::Bool=false: should checkpoints automatically be updated and saved,
  • update::Int=10: update interval in seconds ≥ 1,
  • save::Int=60: saving interval in seconds ≥ 1,
  • kwargs...: keyword arguments to spawn.
Note

Updating or saving is only done automatically if their intervals are ≥ 1 seconds.

source
Actors.checkpointFunction
checkpoint(cp::Link, key::Symbol, args...)

Tell a checkpointing actor to take a checkpoint.

Arguments

  • cp::Link: Link to the checkpointing actor,
  • key::Symbol: key for the checkpoint,
  • args...: variables to save in the checkpoint,
  • level::Int=1: checkpoint level.
source
Actors.restoreFunction
restore(cp::Link; key::Symbol)

Tell a checkpointing actor to restore the last taken checkpoint.

Arguments

  • cp::Link: Link to the checkpointing actor,
  • key::Symbol: checkpoint key,
  • level::Int=1: checkpoint level to restore from.
source
Actors.@chkeyMacro
@chkey a b c 123

Build a checkpointing key from the surrounding module and function names and the given arguments. This is intended for easy construction of checkpointing keys.

Example

module MyModule

using Actors

function mykey()
    a = 1
    b = 2
    c = 3
    # do something
    return @chkey a b c 123
end

export mykey
end # MyModule

julia> using .MyModule

julia> mykey()
:MyModule_mykey_a_b_c_123
source
Actors.set_intervalFunction
set_interval(cp::Link; kwargs...)

Set the checkpointing intervals of a checkpointing actor cp.

Arguments

  • cp::Link: Link to a checkpointing actor,
  • kwargs...: allowed keyword arguments:
    • on:Bool: should checkpoints automatically be updated and saved,
    • update::Int: update interval in seconds ≥ 1,
    • save::Int: saving interval in seconds ≥ 1.
source