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
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
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
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
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
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
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
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