Пример #1
0
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
Пример #2
0
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
Пример #3
0
def do_ckpt():
    '''
    Checkpoint, and then indicate if we are in the initial checkpoint
    or in a restarted version
    '''
    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
Пример #4
0
def do_ckpt():
    '''
    Check point, and then indicate if we are in the initial checkpoint
    or in a restarted version
    '''
    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
Пример #5
0
def magic_run(fn):
    import dmtcp
    assert dmtcp.isEnabled

    i = 0
    while True:
        print 'run', i
        i += 1
        fn()  # run the main program
        res = dmtcp.checkpoint()
        if res == dmtcp.AFTER_CHECKPOINT:
            return