Batch manager specific to cmsRun processes.
Definition at line 297 of file heppy_batch.py.
def heppy_batch.MyBatchManager.PrepareJobUser |
( |
|
self, |
|
|
|
jobDir, |
|
|
|
value |
|
) |
| |
Prepare one job. This function is called by the base class.
Definition at line 300 of file heppy_batch.py.
300 def PrepareJobUser(self, jobDir, value ):
301 '''Prepare one job. This function is called by the base class.'''
303 print(components[value])
306 scriptFileName = jobDir+
'/batchScript.sh'
307 scriptFile = open(scriptFileName,
'w')
308 storeDir = self.remoteOutputDir_.
replace(
'/castor/cern.ch/cms',
'')
309 mode = self.RunningMode(options.batch)
313 scriptFile.write( batchScriptPSI ( value, jobDir, storeDir ) )
314 elif mode ==
'LOCAL':
316 elif mode ==
'PISA' :
318 elif mode ==
'PADOVA' :
323 os.system(
'chmod +x %s' % scriptFileName)
325 shutil.copyfile(cfgFileName, jobDir+
'/pycfg.py')
328 cfgFile = open(jobDir+
'/config.pck',
'w')
329 pickle.dump( components[value] , cfgFile )
332 if hasattr(self,
"heppyOptions_"):
333 optjsonfile = open(jobDir+
'/options.json',
'w')
334 optjsonfile.write(json.dumps(self.heppyOptions_))
References heppy_batch.batchScriptCERN(), heppy_batch.batchScriptIC(), heppy_batch.batchScriptLocal(), heppy_batch.batchScriptPADOVA(), heppy_batch.batchScriptPISA(), edm.print(), batchmanager.BatchManager.remoteOutputDir_, python.rootplot.root2matplotlib.replace(), and batchmanager.BatchManager.RunningMode().