Beispiel #1
0
 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)
Beispiel #2
0
 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)
Beispiel #3
0
 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)