示例#1
0
#!/usr/bin/env python
import os, jobQueue, batchJobArgs

parser = batchJobArgs.argParser("Submit a single job to queue")

parser.add_argument('iniFile', nargs='+')

jobQueue.addArguments(parser)

args = parser.parse_args()

ini = [ini.replace('.ini', '') for ini in args.iniFile]

jobQueue.submitJob(os.path.basename(ini[0]), ini, msg=True, **args.__dict__)
示例#2
0
#!/usr/bin/env python
import hashlib, os, batchJobArgs, jobQueue

Opts = batchJobArgs.batchArgs('Submit jobs to run chains or importance sample', notExist=True, notall=True, converge=True)

jobQueue.addArguments(Opts.parser, combinedJobs=True)

Opts.parser.add_argument('--subitems', action='store_true', help='include sub-grid items')
Opts.parser.add_argument('--not_queued', action='store_true')
Opts.parser.add_argument('--minimize', action='store_true', help='Run minimization jobs')
Opts.parser.add_argument('--importance_minimize', action='store_true', help='Run minimization jobs for chains that are importance sampled')
Opts.parser.add_argument('--minimize_failed', action='store_true', help='run where minimization previously failed')
Opts.parser.add_argument('--checkpoint_run', nargs='?', default=None, const=0, type=float,
                         help='run if stopped and not finished; if optional value given then only run chains with convergence worse than the given value')
Opts.parser.add_argument('--importance_ready', action='store_true', help='where parent chain has converged and stopped')
Opts.parser.add_argument('--importance_changed', action='store_true', help='run importance jobs where the parent chain has changed since last run')
Opts.parser.add_argument('--parent_converge', type=float, default=0, help='minimum R-1 convergence for importance job parent')
Opts.parser.add_argument('--parent_stopped', action='store_true', help='only run if parent chain is not still running')


(batch, args) = Opts.parseForBatch()

if args.not_queued:
    print 'Getting queued names...'
    queued = jobQueue.queue_job_names(args.batchPath)

def notQueued(name):
    for job in queued:
        if name in job:
#            print 'Already running:', name
            return False