コード例 #1
0
def main():
    options = parse_options()
    exe = options.executable
    inputdf = options.input
    include = options.include_regexp
    exclude = options.exclude_regexp
    tag = options.tag
    verbose = options.verbose
    submit = options.submit

    datasets = dataset.build_all_datasets_from_dir_or_file(inputdf)
    datasets = utils.filterWithRegexp(
        datasets, include, lambda _: _.name) if include else datasets
    datasets = utils.excludeWithRegexp(
        datasets, exclude, lambda _: _.name) if exclude else datasets

    for dset in datasets:
        if not get_filelist(dset.name):
            print "# skipping (missing filelist) {0}".format(dset.name)
            continue
        script = get_batch_script(dset, options)
        if not script:
            if verbose:
                print "skipping (do-not-overwrite) {0}".format(dset.name)
            continue
        cmd = "sbatch %s" % script
        if verbose: print cmd
        if submit:
            out = utils.getCommandOutput(cmd)
            if verbose: print out['stdout']
    if not submit:
        print "This was a dry run; use '--submit' to actually submit the jobs"
コード例 #2
0
ファイル: submitJobs.py プロジェクト: gerbaudo/SusyntHlfv
def main():
    options = parse_options()
    exe     = options.executable
    inputdf = options.input
    include = options.include_regexp
    exclude = options.exclude_regexp
    tag     = options.tag
    verbose = options.verbose
    submit  = options.submit

    datasets = dataset.build_all_datasets_from_dir_or_file(inputdf)
    datasets = utils.filterWithRegexp (datasets, include, lambda _: _.name) if include else datasets
    datasets = utils.excludeWithRegexp(datasets, exclude, lambda _: _.name) if exclude else datasets

    for dset in datasets :
        if not get_filelist(dset.name):
            print "# skipping (missing filelist) {0}".format(dset.name)
            continue
        script = get_batch_script(dset, options)
        if not script:
            if verbose : print "skipping (do-not-overwrite) {0}".format(dset.name)
            continue
        cmd = "sbatch %s" % script
        if verbose : print cmd
        if submit :
            out = utils.getCommandOutput(cmd)
            if verbose : print out['stdout']
    if not submit : print "This was a dry run; use '--submit' to actually submit the jobs"
コード例 #3
0
ファイル: makeList.py プロジェクト: PraderioM/SusyntHlfv
def main():
    options = parse_options()
    inputdf = options.input
    outdir = options.output_dir
    regexp = options.sample_regexp
    exclude = options.exclude_regexp
    tag = options.tag
    verbose = options.verbose
    debug = options.debug

    utils.mkdirIfNeeded(outdir)
    if debug: dataset.Dataset.verbose_parsing = True
    datasets = dataset.build_all_datasets_from_dir_or_file(inputdf)
    datasets = utils.filterWithRegexp(datasets, regexp,
                                      lambda _: _.name) if regexp else datasets
    datasets = utils.excludeWithRegexp(
        datasets, exclude, lambda _: _.name) if exclude else datasets
    counter = {'fail': 0, 'pass': 0}
    for d in datasets:
        outcome = 'pass' if d.build_filelist(gpatlas_dir(d, tag), outdir,
                                             verbose) else 'fail'
        counter[outcome] += 1
    if verbose:
        print "created %d filelists (%d failures)" % (counter['pass'],
                                                      counter['fail'])
コード例 #4
0
ファイル: makeList.py プロジェクト: gerbaudo/susynt-ss3l
def main():
    options = parse_options()
    inputdf = options.input
    outdir  = options.output_dir
    regexp  = options.sample_regexp
    exclude = options.exclude_regexp
    tag     = options.tag
    verbose = options.verbose
    debug   = options.debug

    utils.mkdirIfNeeded(outdir)
    if debug : dataset.Dataset.verbose_parsing = True
    datasets = dataset.build_all_datasets_from_dir_or_file(inputdf)
    datasets = utils.filterWithRegexp (datasets, regexp, lambda _: _.name) if regexp else datasets
    datasets = utils.excludeWithRegexp(datasets, exclude, lambda _: _.name) if exclude else datasets
    counter = {'fail':0, 'pass':0}
    for d in datasets:
        outcome = 'pass' if  d.build_filelist(gpatlas_dir(d, tag), outdir, verbose) else 'fail'
        counter[outcome] += 1
    if verbose:
        print "created %d filelists (%d failures)" % (counter['pass'], counter['fail'])