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