示例#1
0
def download_runcard(input_folder, runcard, runname):
    tar = warmup_name(runcard, runname)
    gf.print_flush("downloading " + input_folder + "/" + tar)
    stat = gf.copy_from_grid(input_folder + "/" + tar, tar, args)
    gf.print_flush("finished copying from grid storage... untarring now")
    stat += gf.untar_file(tar)
    return gf.do_shell("rm {0}".format(tar)) + stat
示例#2
0
def download_rivet(rivet_folder):
    tar = os.path.basename(rivet_folder)
    gf.print_flush("downloading "+rivet_folder)
    stat = gf.copy_from_grid(rivet_folder, "", args)
    stat += gf.untar_file(tar)
    rivet_dir = os.path.basename(os.path.splitext(rivet_folder)[0])
    os.environ['RIVET_ANALYSIS_PATH'] = os.getcwd()+"/"+rivet_dir
    return gf.do_shell("rm {0}".format(tar))+stat
示例#3
0
def download_runcard(input_folder, runcard, runname):
    tar = warmup_name(runcard, runname)
    gf.print_flush("downloading "+input_folder+"/"+tar)
    stat = gf.copy_from_grid(input_folder+"/"+tar, tar, args)
    stat += gf.untar_file(tar)
    # TODO download:
    #   Scale setters
    return gf.do_shell("rm {0}".format(tar))+stat
示例#4
0
def bring_nnlojet(input_grid, runcard, runname):
    # Todo: this is not very general, is it?
    tmp_tar = "nnlojet.tar.gz"
    input_name = "{0}/{1}{2}.tar.gz".format(input_grid, runcard, runname)
    stat = gf.copy_from_grid(input_name, tmp_tar, args)
    stat += gf.untar_file(tmp_tar)
    stat += gf.do_shell("rm {0}".format(tmp_tar))
    stat += gf.do_shell("ls")
    return stat
示例#5
0
def download_program(source):
    tar_name = os.path.basename(source)
    if not tar_name.endswith("tar.gz"):
        gf.print_flush("{0} is not a valid path to download".format(source))
        return 1
    stat = gf.copy_from_grid(source, tar_name, args)
    stat += gf.untar_file(tar_name)
    stat += gf.do_shell("rm {0}".format(tar_name))
    if gf.DEBUG_LEVEL > 2:
        gf.do_shell("ls -l")
    return stat
示例#6
0
def bring_lhapdf(lhapdf_grid):
    tmp_tar = "lhapdf.tar.gz"
    stat = gf.copy_from_grid(lhapdf_grid, tmp_tar, args)
    gf.print_flush("LHAPDF copy from GRID status: {0}".format(stat))
    stat += gf.untar_file(tmp_tar)
    return gf.do_shell("rm {0}".format(tmp_tar))+stat
示例#7
0
def download_latin_hypercube(input_folder, latin_hypercube):
    lhs = latin_hypercube + ".npy"
    gf.print_flush("downloading " + input_folder + "/" + lhs)
    stat = gf.copy_from_grid(input_folder + "/" + lhs, lhs, args)
    return stat
示例#8
0
def download_world(input_folder, world):
    world_file = world + ".hdf5"
    gf.print_flush("downloading " + input_folder + "/worlds/" + world_file)
    stat = gf.copy_from_grid(input_folder + "/worlds/" + world_file,
                             world_file, args)
    return stat