コード例 #1
0
def main():
    recipe_name, ing_name = parse_arguments()
    mymon = MASTMon()
    my_recipe_plan = mymon.set_up_recipe_plan(recipe_name, 1)
    my_recipe_plan.ingred_to_check = ing_name
    my_recipe_plan.check_recipe_status()
    return 0
コード例 #2
0
ファイル: mast_do_setup_python.py プロジェクト: uw-cmg/MAST
def main():
    recipe_name, ing_name = parse_arguments()   
    mymon = MASTMon()
    my_recipe_plan = mymon.set_up_recipe_plan(recipe_name, 1)
    my_recipe_plan.ingred_to_check = ing_name
    my_recipe_plan.check_recipe_status()
    return 0
コード例 #3
0
def main():
    recipe_name, ing_name = parse_arguments()   
    mymon = MASTMon()
    my_recipe_plan = mymon.set_up_recipe_plan(recipe_name, 1)
    my_recipe_plan.ingred_to_check = ing_name
    is_complete = my_recipe_plan.complete_ingredient(ing_name)
    print "COMPLETE: %s" % is_complete
    if is_complete:
        my_recipe_plan.check_recipe_status()
        return 0
    return -1
コード例 #4
0
def main():
    recipe_name, ing_name = parse_arguments()
    mymon = MASTMon()
    my_recipe_plan = mymon.set_up_recipe_plan(recipe_name, 1)
    my_recipe_plan.ingred_to_check = ing_name
    is_complete = my_recipe_plan.complete_ingredient(ing_name)
    print "COMPLETE: %s" % is_complete
    if is_complete:
        my_recipe_plan.check_recipe_status()
        return 0
    return -1
コード例 #5
0
ファイル: make_my_dag.py プロジェクト: uw-cmg/MAST
def main():
    recipe_name, script_head_dir = parse_arguments()   
    mast_scratch = dirutil.get_mast_scratch_path()
    mymon = MASTMon()
    my_recipe_plan = mymon.set_up_recipe_plan(os.path.join(mast_scratch, recipe_name), 1)
    my_dag_contents=list()
    for iname in my_recipe_plan.ingredients: #all JOB lines need to be at top
        my_dag_contents.append("JOB %s submit.sh DIR %s\n" % (iname, iname))
    for iname in my_recipe_plan.ingredients:
        my_dag_contents.append("SCRIPT PRE %s %s/mast_do_setup.sh %s %s\n" % (iname, script_head_dir, recipe_name, iname)) 
        my_dag_contents.append("SCRIPT POST %s %s/mast_check_is_complete.sh %s %s\n" % (iname, script_head_dir, recipe_name, iname)) 
        my_dag_contents.append("RETRY %s 5\n" % iname)
        ptc = list(my_recipe_plan.parents_to_check[iname])
        for pname in ptc:
            my_dag_contents.append("PARENT %s CHILD %s\n" % (pname, iname))
    my_dag_file = MASTFile()
    my_dag_file.data = my_dag_contents
    my_dag_file.to_file(os.path.join(mast_scratch, recipe_name, "recipe.dag"))
    #print_to_file(recipe_name, ing_name, "MAIN: is complete: %s" % is_complete)
    return 0
コード例 #6
0
ファイル: make_my_dag.py プロジェクト: zhenming-xu/MAST
def main():
    recipe_name, script_head_dir = parse_arguments()
    mast_scratch = dirutil.get_mast_scratch_path()
    mymon = MASTMon()
    my_recipe_plan = mymon.set_up_recipe_plan(
        os.path.join(mast_scratch, recipe_name), 1)
    my_dag_contents = list()
    for iname in my_recipe_plan.ingredients:  #all JOB lines need to be at top
        my_dag_contents.append("JOB %s submit.sh DIR %s\n" % (iname, iname))
    for iname in my_recipe_plan.ingredients:
        my_dag_contents.append("SCRIPT PRE %s %s/mast_do_setup.sh %s %s\n" %
                               (iname, script_head_dir, recipe_name, iname))
        my_dag_contents.append(
            "SCRIPT POST %s %s/mast_check_is_complete.sh %s %s\n" %
            (iname, script_head_dir, recipe_name, iname))
        my_dag_contents.append("RETRY %s 5\n" % iname)
        ptc = list(my_recipe_plan.parents_to_check[iname])
        for pname in ptc:
            my_dag_contents.append("PARENT %s CHILD %s\n" % (pname, iname))
    my_dag_file = MASTFile()
    my_dag_file.data = my_dag_contents
    my_dag_file.to_file(os.path.join(mast_scratch, recipe_name, "recipe.dag"))
    #print_to_file(recipe_name, ing_name, "MAIN: is complete: %s" % is_complete)
    return 0
コード例 #7
0
ファイル: runmast.py プロジェクト: zhenming-xu/MAST
#!/usr/bin/env python
##############################################################
# This code is part of the MAterials Simulation Toolkit (MAST)
#
# Maintainer: Tam Mayeshiba
# Last updated: 2014-04-25
##############################################################
from MAST.controllers.mastmon import MASTMon
mastmon = MASTMon()
#mastmon.run(1) #Use 0 for non-verbose