Skip to content

Commit

Permalink
add support for SCRAM_MIN_SUPPORTED_MICROARCH. Fix #5354 (#5362)
Browse files Browse the repository at this point in the history
  • Loading branch information
belforte authored Dec 11, 2024
1 parent c2ca6bd commit 2520b72
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/python/CRABClient/JobType/Analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def run(self, filecacheurl = None, ): # pylint: disable=arguments-differ
scram = ScramEnvironment(logger=self.logger)

configArguments.update({'jobarch': scram.getScramArch(),
'jobminuarch': scram.getScramMicroArch(),
'jobsw': scram.getCmsswVersion()})

# Build tarball
Expand Down
8 changes: 8 additions & 0 deletions src/python/CRABClient/JobType/ScramEnvironment.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ def initFromEnv(self):
stdout, _, _ = execute_command(command='scram arch')
self["SCRAM_ARCH"] = stdout

self["SCRAM_MIN_SUPPORTED_MICROARCH"] = os.environ.get("SCRAM_MIN_SUPPORTED_MICROARCH", "any")

try:
self["CMSSW_BASE"] = os.environ["CMSSW_BASE"]
self["CMSSW_VERSION"] = os.environ["CMSSW_VERSION"]
Expand Down Expand Up @@ -101,3 +103,9 @@ def getScramArch(self):
Determine the scram architecture
"""
return self["SCRAM_ARCH"]

def getScramMicroArch(self):
"""
Determine the minimum required scram micro-architecture
"""
return self["SCRAM_MIN_SUPPORTED_MICROARCH"]

0 comments on commit 2520b72

Please sign in to comment.