Skip to content

Commit

Permalink
first commit to add attributes of GPU to the workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Norraphat committed Mar 3, 2021
1 parent 11c42d5 commit 613e547
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Configuration/PyReleaseValidation/python/MatrixInjector.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ def __init__(self,opt,mode='init',options=''):
self.batchTime = str(int(time.time()))
if(opt.batchName):
self.batchName = '__'+opt.batchName+'-'+self.batchTime
#GPU tuff
self.gpuClass = opt.gpuClass
self.gpuDriverVersion = opt.gpuDriverVersion
self.gpuRuntime = opt.gpuRuntime
self.gpuMemory = opt.gpuMemory
self.gpuRuntimeVersion = opt.gpuRuntimeVersion

#wagemt stuff
if not self.wmagent:
Expand Down Expand Up @@ -119,6 +125,11 @@ def __init__(self,opt,mode='init',options=''):
"Memory" : 3000,
"SizePerEvent" : 1234,
"TimePerEvent" : 10,
"GPUClass": None,
"GPUDriverVersion": None,
"GPURuntime": None,
"GPUMemory": None,
"GPURuntimeVersion": None,
"PrepID": os.getenv('CMSSW_VERSION')
}

Expand Down Expand Up @@ -308,6 +319,16 @@ def prepare(self, mReader, directories, mode='init'):
for (n,dir) in directories.items():
chainDict=copy.deepcopy(self.defaultChain)
print("inspecting",dir)
if self.gpuClass:
chainDict['GPUClass'] = self.gpuClass
if self.gpuDriverVersion:
chainDict['GPUDriverVersion'] =self.gpuDriverVersion
if self.gpuRuntime:
chainDict['GPURuntime'] =self.gpuRuntime
if self.gpuMemory:
chainDict['GPUMemory'] =self.gpuMemory
if self.gpuRuntimeVersion:
chainDict['GPURuntimeVersion'] =self.gpuRuntimeVersion
nextHasDSInput=None
for (x,s) in mReader.workFlowSteps.items():
#x has the format (num, prefix)
Expand Down
16 changes: 16 additions & 0 deletions Configuration/PyReleaseValidation/scripts/runTheMatrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,22 @@ def runSelected(opt):
default='T2_CH_CERN',
action='store')

parser.add_option('--gpuClass',
help='to specify GPU class',
default='')
parser.add_option('--gpuDriverVersion',
help='to specify GPU driver version',
default='')
parser.add_option('--gpuRuntime',
help='to specify GPU runtime',
default='')
parser.add_option('--gpuMemory',
help='to specify GPU memory',
default='')
parser.add_option('--gpuRuntimeVersion',
help='to specify GPU runtime version',
default='')

opt,args = parser.parse_args()
os.environ["CMSSW_DAS_QUERY_SITES"]=opt.dasSites
if opt.IBEos:
Expand Down

0 comments on commit 613e547

Please sign in to comment.