예제 #1
0
            })))
    mc.set(
        fst.MakeCheckpoint(
            fst.args({
                "file_name":
                "checkpoint" + str(thread) + ".fst",
                "num_hours_terminate":
                str(0.9 * args.num_procs * args.num_hours)
            })))
    return mc


windows = fst.WindowExponential(
    fst.args({
        "alpha": "1.75",
        "num": str(args.num_procs),
        "minimum": str(args.min_particles),
        "maximum": str(args.max_particles),
        "extra_overlap": "0"
    })).boundaries()
print(windows)

if args.task == 0:
    clones = fst.MakeClones()
    for proc, win in enumerate(windows):
        clones.add(mc(proc, win[0], win[1]))
    clones.set(fst.MakeCheckpoint(fst.args({"file_name": "checkpoint.fst"})))
else:
    clones = fst.MakeClones("checkpoint", args.num_procs)
#clones.initialize_and_run_until_complete()
clones.initialize_and_run_until_complete(
    fst.args({"ln_prob_file": "ln_prob.txt"}))
    mc.set(
        fst.MakeCheckpoint(
            fst.args({
                "file_name":
                "checkpoint" + str(thread) + ".fst",
                "num_hours":
                str(0.1 * args.num_procs * args.num_hours),
                "num_hours_terminate":
                str(0.9 * args.num_procs * args.num_hours)
            })))
    return mc


windows = fst.WindowExponential(
    fst.args({
        "alpha": "2.5",
        "num": str(args.num_procs),
        "maximum": str(args.max_particles)
    })).boundaries()
print(windows)

if args.task == 0:
    clones = fst.MakeClones()
    for proc, win in enumerate(windows):
        clones.add(mc(proc, win[0], win[1]))
    clones.set(fst.MakeCheckpoint(fst.args({"file_name": "checkpoint.fst"})))
else:
    clones = fst.MakeClones("checkpoint", args.num_procs)
#clones.initialize_and_run_until_complete()
clones.initialize_and_run_until_complete(
    fst.args({
        "ln_prob_file": "ln_prob.txt",
예제 #3
0
            })))
    mc.set(
        fst.MakeCheckpoint(
            fst.args({
                "file_name":
                "checkpoint" + str(thread) + ".fst",
                "num_hours_terminate":
                str(0.9 * args.num_procs * args.num_hours)
            })))
    return mc


windows = fst.WindowExponential(
    fst.args({
        "alpha": "1.75",
        "num": str(args.num_procs),
        "maximum": str(args.max_molecules),
        "extra_overlap": "2"
    })).boundaries()
print(windows)

if args.task == 0:
    clones = fst.MakeClones()
    for proc, win in enumerate(windows):
        clones.add(mc(proc, win[0], win[1]))
    clones.set(fst.MakeCheckpoint(fst.args({"file_name": "checkpoint.fst"})))
else:
    clones = fst.MakeClones("checkpoint", args.num_procs)
clones.initialize_and_run_until_complete(
    fst.args({"ln_prob_file": "ln_prob.txt"}))
print(clones.ln_prob().values())