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

added --sites options for runTheMatrix #31535

Merged
merged 1 commit into from Sep 25, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 9 additions & 2 deletions Configuration/PyReleaseValidation/python/MatrixUtil.py
@@ -1,4 +1,5 @@
from __future__ import print_function
import os
class Matrix(dict):
def __setitem__(self,key,value):
if key in self:
Expand Down Expand Up @@ -177,11 +178,17 @@ def queries(self, dataset):
#print the_queries
return the_queries

site = " site=T2_CH_CERN"
if "CMSSW_DAS_QUERY_SITES" in os.environ:
if os.environ["CMSSW_DAS_QUERY_SITES"]:
site = " site=%s" % os.environ["CMSSW_DAS_QUERY_SITES"]
else:
site = ""
if len(self.run) is not 0:
return ["file {0}={1} run={2} site=T2_CH_CERN".format(query_by, query_source, query_run) for query_run in self.run]
return ["file {0}={1} run={2}{3}".format(query_by, query_source, query_run, site) for query_run in self.run]
#return ["file {0}={1} run={2} ".format(query_by, query_source, query_run) for query_run in self.run]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need to keep this line?

else:
return ["file {0}={1} site=T2_CH_CERN".format(query_by, query_source)]
return ["file {0}={1}{2}".format(query_by, query_source, site)]
#return ["file {0}={1} ".format(query_by, query_source)]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need to keep this line?


def __str__(self):
Expand Down
10 changes: 8 additions & 2 deletions Configuration/PyReleaseValidation/scripts/runTheMatrix.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
from __future__ import print_function
import sys
import sys, os

from Configuration.PyReleaseValidation.MatrixReader import MatrixReader
from Configuration.PyReleaseValidation.MatrixRunner import MatrixRunner
Expand Down Expand Up @@ -281,9 +281,15 @@ def runSelected(opt):
default=False,
action='store_true')

parser.add_option('--sites',
help='Run DAS query to get data from a specific site (default is T2_CH_CERN). Set it to empty string to search all sites.',
dest='dasSites',
default='T2_CH_CERN',
action='store')

opt,args = parser.parse_args()
os.environ["CMSSW_DAS_QUERY_SITES"]=opt.dasSites
if opt.IBEos:
import os
try:from commands import getstatusoutput as run_cmd
except:from subprocess import getstatusoutput as run_cmd

Expand Down