예제 #1
0
def loop_sim(sim, level=0):
    title = ccodes.f('sim') + '=' + ccodes.blue('{sim}')
    indent(title, level=level, sim=os.path.basename(sim))
    parts = lm.find.parts(sim)
    for part in parts:
        loop_part(part, level=level + 1)
예제 #2
0
def loop_sim(sim, level=0):
    title = ccodes.f('sim') + '=' + ccodes.blue('{sim}')
    indent(title, level=level, sim=os.path.basename(sim))
    parts = lm.find.parts(sim)
    for part in parts:
        loop_part(part, level=level + 1)
예제 #3
0
    if not parts:
        print ccodes.red('error: can not find any parts, try using -r')
        sys.exit(-1)

    new_parts, errors = [], 0
    for i, part in enumerate(parts):
        if i > 0:
            print ''

        part_relpath = os.path.relpath(part, work)
        print ccodes.yellow('found: ' +  part_relpath)

        chk = lm.find.chk(part)
        if not chk:
            print ccodes.red('error:') + ' ' + ccodes.blue('can not find chk!')
            errors += 1
            continue
        else:
            chk = lm.checkpoint.load(chk)

        if opts.pstep:
            chk['iterations.print'] = opts.pstep

        if opts.set:
            chk['iterations.real'] = opts.set
        else:
            try:
                chk['iterations.real'] += opts.add
            except KeyError:
                chk['iterations.real'] = opts.add
예제 #4
0
    if not parts:
        print ccodes.red('error: can not find any parts, try using -r')
        sys.exit(-1)

    new_parts, errors = [], 0
    for i, part in enumerate(parts):
        if i > 0:
            print ''

        part_relpath = os.path.relpath(part, work)
        print ccodes.yellow('found: ' + part_relpath)

        chk = lm.find.chk(part)
        if not chk:
            print ccodes.red('error:') + ' ' + ccodes.blue('can not find chk!')
            errors += 1
            continue
        else:
            chk = lm.checkpoint.load(chk)

        if opts.pstep:
            chk['iterations.print'] = opts.pstep

        if opts.set:
            chk['iterations.real'] = opts.set
        else:
            try:
                chk['iterations.real'] += opts.add
            except KeyError:
                chk['iterations.real'] = opts.add