Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to pass das_client.py options via runTheMatrix.py. #2420

Merged
merged 1 commit into from
Feb 14, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Configuration/PyReleaseValidation/python/MatrixRunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def runTests(self, opt):

print '\nPreparing to run %s %s' % (wf.numId, item)

current = WorkFlowRunner(wf,noRun,dryRun,cafVeto)
current = WorkFlowRunner(wf,noRun,dryRun,cafVeto, opt.dasOptions)
self.threadList.append(current)
current.start()
if not dryRun:
Expand Down
5 changes: 3 additions & 2 deletions Configuration/PyReleaseValidation/python/WorkFlowRunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from subprocess import Popen

class WorkFlowRunner(Thread):
def __init__(self, wf, noRun=False,dryRun=False,cafVeto=True):
def __init__(self, wf, noRun=False,dryRun=False,cafVeto=True,dasOptions=""):
Thread.__init__(self)
self.wf = wf

Expand All @@ -18,6 +18,7 @@ def __init__(self, wf, noRun=False,dryRun=False,cafVeto=True):
self.noRun=noRun
self.dryRun=dryRun
self.cafVeto=cafVeto
self.dasOptions=dasOptions

self.wfDir=str(self.wf.numId)+'_'+self.wf.nameId
return
Expand Down Expand Up @@ -100,7 +101,7 @@ def closeCmd(i,ID):
cmd2 =cmd+cmd2+closeCmd(istep,'lumiRanges')
lumiRangeFile='step%d_lumiRanges.log'%(istep,)
retStep = self.doCmd(cmd2)
cmd+=com.das()
cmd+=com.das(self.dasOptions)
cmd+=closeCmd(istep,'dasquery')
retStep = self.doCmd(cmd)
#don't use the file list executed, but use the das command of cmsDriver for next step
Expand Down
6 changes: 3 additions & 3 deletions Configuration/PyReleaseValidation/python/relval_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ def __init__(self,dataSet,label='',run=[],files=1000,events=InputInfoNDefault,sp
self.ib_blacklist = ib_blacklist
self.ib_block = ib_block

def das(self):
def das(self, das_options):
query_by = "block" if self.ib_block else "dataset"
query_source = "{0}#{1}".format(self.dataSet, self.ib_block) if self.ib_block else self.dataSet
if len(self.run) is not 0:
command = ";".join(["das_client.py --limit=0 --query 'file {0}={1} run={2}'".format(query_by, query_source, query_run) for query_run in self.run])
command = ";".join(["das_client.py {3} --query 'file {0}={1} run={2}'".format(query_by, query_source, query_run, das_options) for query_run in self.run])
command = "({0})".format(command)
else:
command = "das_client.py --limit=0 --query 'file {0}={1} site=T2_CH_CERN'".format(query_by, query_source)
command = "das_client.py {2} --query 'file {0}={1} site=T2_CH_CERN'".format(query_by, query_source, das_options)

# Run filter on DAS output
if self.ib_blacklist:
Expand Down
5 changes: 5 additions & 0 deletions Configuration/PyReleaseValidation/scripts/runTheMatrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,11 @@ def runSelected(opt):
default=False,
action='store_true')

parser.add_option('--das-options',
help='Options to be passed to das_client.py.',
dest='dasOptions',
default="--limit 0",
action='store')


opt,args = parser.parse_args()
Expand Down