ATLAS Offline Software
Loading...
Searching...
No Matches
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"""
7LSFJobRunner is a JobRunner for running jobs with the LSF batch system.
8
9Written 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
15from InDetBeamSpotExample import JobRunner
16import os
17
18
19class 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