File: hookexample.py

package info (click to toggle)
dmtcp 2.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 6,496 kB
  • sloc: cpp: 33,592; ansic: 28,099; sh: 6,735; makefile: 1,950; perl: 1,690; python: 1,241; asm: 138; java: 13
file content (21 lines) | stat: -rw-r--r-- 358 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import dmtcp

def my_ckpt():
    print "About to checkpoint."

    dmtcp.checkpoint()
    print "Checkpoint done."

    if dmtcp.isResume():
        print "The process is resuming from a checkpoint."
    else:
        print "The process is restarting from a previous checkpoint."
    return

x = 1
print x

print "Calling my_ckpt()"
my_ckpt()
x = 12
print x