ATLAS Offline Software
LSFJobRunner.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
4 
5 from __future__ import print_function
6 
7 """
8 LSFJobRunner is a JobRunner for running jobs with the LSF batch system.
9 
10 Written by Juerg Beringer (LBNL) in 2008.
11 """
12 __author__ = 'Juerg Beringer'
13 __version__ = '$Id: LSFJobRunner.py 216126 2009-09-29 16:12:59Z atlidbs $'
14 
15 
16 from InDetBeamSpotExample import JobRunner
17 import os
18 
19 
20 class LSFJobRunner(JobRunner):
21  """LSFJobRunner - run jobs using the LSF batch system"""
22 
23  def __init__(self,**params):
24  """Constructor (takes any number of parameters as an argument)."""
25  JobRunner.__init__(self)
26 
27  # Set user-specified parameters only after LSFJobRunner defaults
28  self.setParam('batchqueue','8nm','Batch queue')
29  for k in params.keys():
30  self.setParam(k,params[k])
31  self.checkParams()
32 
33  def submitJob(self,jobConfig):
34  """Submit a JobRunner job as a LSF batch job."""
35  batchCmd = 'bsub -L /bin/bash -q %(batchqueue)s -J %(jobname)s -o %(logfile)s %(scriptfile)s' % jobConfig
36  print (batchCmd)
37  os.system(batchCmd)
38  return None
python.LSFJobRunner.LSFJobRunner
Definition: LSFJobRunner.py:20
python.LSFJobRunner.LSFJobRunner.submitJob
def submitJob(self, jobConfig)
Definition: LSFJobRunner.py:33
python.LSFJobRunner.LSFJobRunner.__init__
def __init__(self, **params)
Definition: LSFJobRunner.py:23