コード例 #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
ファイル: 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)
コード例 #3
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)