예제 #1
0
파일: stack.py 프로젝트: cvaske/jobTree
 def startJobTree(self, options):
     """Runs jobtree using the given options (see Stack.getDefaultOptions
     and Stack.addJobTreeOptions).
     """
     setLoggingFromOptions(options)
     options.jobTree = os.path.abspath(options.jobTree)
     if os.path.isdir(options.jobTree):
         config, batchSystem = reloadJobTree(options.jobTree)
     else:
         config, batchSystem = createJobTree(options)
         #Setup first job.
         command = self.makeRunnable(options.jobTree)
         memory = self.getMemory()
         cpu = self.getCpu()
         time = self.getRunTime()
         if memory != sys.maxint:
             if cpu != sys.maxint:
                 createFirstJob(command, config, memory=memory, cpu=cpu, time=time)
             else:
                 createFirstJob(command, config, memory=memory, time=time)
         else:
             if cpu != sys.maxint:
                 createFirstJob(command, config, cpu=cpu, time=time)
             else:
                 createFirstJob(command, config, time=time)
     loadEnvironment(config)
     return mainLoop(config, batchSystem)
예제 #2
0
def runJobTreeScript(options):
    """Builds the basic job tree, or takes an existing one
    and runs the job tree master script.
    """
    setLoggingFromOptions(options)
    assert options.jobTree != None  #We need a job tree, or a place to create one
    if os.path.isdir(options.jobTree):
        config, batchSystem = reloadJobTree(options.jobTree)
    else:
        assert options.command != None
        config, batchSystem = createJobTree(options)
        #Setup first job.
        createFirstJob(options.command, config)
    loadEnvironment(config)
    return mainLoop(config, batchSystem)
예제 #3
0
def runJobTreeScript(options):
    """Builds the basic job tree, or takes an existing one
    and runs the job tree master script.
    """
    setLoggingFromOptions(options)
    assert options.jobTree != None #We need a job tree, or a place to create one
    if os.path.isdir(options.jobTree):
        config, batchSystem = reloadJobTree(options.jobTree)
    else:
        assert options.command != None
        config, batchSystem = createJobTree(options)
        #Setup first job.
        createFirstJob(options.command, config)
    loadEnvironment(config)
    return mainLoop(config, batchSystem)
예제 #4
0
파일: stack.py 프로젝트: hj1994412/jobTree
 def startJobTree(self, options):
     """Runs jobtree using the given options (see Stack.getDefaultOptions
     and Stack.addJobTreeOptions).
     """
     self.verifyJobTreeOptions(options)
     setLoggingFromOptions(options)
     options.jobTree = absSymPath(options.jobTree)
     if os.path.isdir(options.jobTree):
         config, batchSystem = reloadJobTree(options.jobTree)
     else:
         config, batchSystem = createJobTree(options)
         #Setup first job.
         command = self.makeRunnable(options.jobTree)
         memory = self.getMemory()
         cpu = self.getCpu()
         createFirstJob(command, config, memory=memory, cpu=cpu)
     loadEnvironment(config)
     return mainLoop(config, batchSystem)
예제 #5
0
파일: stack.py 프로젝트: ArtRand/jobTree
 def startJobTree(self, options):
     """Runs jobtree using the given options (see Stack.getDefaultOptions
     and Stack.addJobTreeOptions).
     """
     self.verifyJobTreeOptions(options)
     setLoggingFromOptions(options)
     options.jobTree = absSymPath(options.jobTree)
     if os.path.isdir(options.jobTree):
         config, batchSystem = reloadJobTree(options.jobTree)
     else:
         config, batchSystem = createJobTree(options)
         #Setup first job.
         command = self.makeRunnable(options.jobTree)
         memory = self.getMemory()
         cpu = self.getCpu()
         createFirstJob(command, config, memory=memory, cpu=cpu)
     loadEnvironment(config)
     return mainLoop(config, batchSystem)