Example #1
0
def submitJob(ini):
    global iniFiles
    ini = ini.replace('.ini', '')
    if not args.dryrun:
        print('Submitting...' + ini)
    else:
        print('... ' + ini)
    iniFiles.append(ini)
    if args.combineOneJobName: return
    if len(iniFiles) >= args.runsPerJob:
        if args.runsPerJob > 1: print('--> jobName: ', jobName())
        jobqueue.submitJob(jobName(), iniFiles, **args.__dict__)
        iniFiles = []
Example #2
0
def submitJob(ini):
    global iniFiles
    ini = ini.replace('.ini', '')
    if not args.dryrun:
        print('Submitting...' + ini)
    else:
        print('... ' + ini)
    iniFiles.append(ini)
    if args.combineOneJobName: return
    if len(iniFiles) >= args.runsPerJob:
        if args.runsPerJob > 1: print('--> jobName: ', jobName())
        jobqueue.submitJob(jobName(), iniFiles, **args.__dict__)
        iniFiles = []
Example #3
0
#!/usr/bin/env python

import os
from paramgrid import batchjob_args, jobqueue


parser = batchjob_args.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__)
Example #4
0
            if args.converge == 0 or not jobItem.hasConvergeBetterThan(
                    args.converge, returnNotExist=True):
                if args.checkpoint_run is None or jobItem.wantCheckpointContinue(
                        args.checkpoint_run) and jobItem.notRunning():
                    if (not jobItem.isImportanceJob or isMinimize
                        or (args.importance_ready and jobItem.parent.chainFinished()
                            or not args.importance_ready and (args.filters or jobItem.parent.chainExists()))
                        and (not args.importance_changed or jobItem.parentChanged())
                        and (not args.parent_stopped or jobItem.parent.notRunning())) \
                            and (not args.chain_exists or jobItem.chainExists()):
                        if jobItem.isImportanceJob and hasattr(
                                jobItem, 'importanceFilter'):
                            if args.filters:
                                if jobItem.parent.chainExists():
                                    print('Filtering for... %s' % jobItem.name)
                                    jobItem.importanceFilter.filter(
                                        batch, jobItem)
                                else:
                                    print("parent chains don't exist: %s" %
                                          (jobItem.name))
                        elif not args.filters:
                            if not args.not_queued or notQueued(jobItem.name):
                                submitJob(jobItem.iniFile(variant))

if len(iniFiles) > 0:
    if args.runsPerJob > 1: print('--> jobName: ', jobName())
    jobqueue.submitJob(args.combineOneJobName or jobName(),
                       iniFiles,
                       sequential=args.combineOneJobName is not None,
                       **args.__dict__)
Example #5
0
#!/usr/bin/env python

import os
from paramgrid import batchjob_args, jobqueue

parser = batchjob_args.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__)
Example #6
0
         or not isMinimize and not jobItem.chainExists()) and (
                not args.minimize_failed or not jobItem.chainMinimumConverged())
        and (isMinimize or args.notall is None or not jobItem.allChainExists(args.notall))) \
            and (not isMinimize or getattr(jobItem, 'want_minimize', True)):
        if not args.parent_converge or not jobItem.isImportanceJob or jobItem.parent.hasConvergeBetterThan(
                args.parent_converge):
            if args.converge == 0 or not jobItem.hasConvergeBetterThan(args.converge, returnNotExist=True):
                if args.checkpoint_run is None or jobItem.wantCheckpointContinue(
                        args.checkpoint_run) and jobItem.notRunning():
                    if (not jobItem.isImportanceJob or isMinimize
                        or (args.importance_ready and jobItem.parent.chainFinished()
                            or not args.importance_ready and (args.filters or jobItem.parent.chainExists()))
                        and (not args.importance_changed or jobItem.parentChanged())
                        and (not args.parent_stopped or jobItem.parent.notRunning())) \
                            and (not args.chain_exists or jobItem.chainExists()):
                        if jobItem.isImportanceJob and hasattr(jobItem, 'importanceFilter'):
                            if args.filters:
                                if jobItem.parent.chainExists():
                                    print('Filtering for... %s' % jobItem.name)
                                    jobItem.importanceFilter.filter(batch, jobItem)
                                else:
                                    print("parent chains don't exist: %s" % (jobItem.name))
                        elif not args.filters:
                            if not args.not_queued or notQueued(jobItem.name):
                                submitJob(jobItem.iniFile(variant))

if len(iniFiles) > 0:
    if args.runsPerJob > 1: print('--> jobName: ', jobName())
    jobqueue.submitJob(args.combineOneJobName or jobName(), iniFiles, sequential=args.combineOneJobName is not None,
                       **args.__dict__)