---++Basic description and usage of the automatized crab job submission script for the IBs. ---+++IDEA Run a script triggered by a cronjob, which sends some 'standard' CMSSW jobs on real data to the grid. ---+++OPERATION The files are located here: http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/UserCode/bbozsogi/CRABCAF/ The cronjob starts =Tester/standaloneTester-caf.py= every 12h. Next to the usual statusFile (containing the time it started, finished), I set up a global statusFile (**now it's in my AFS area**), preventing to start new CAF jobs before the latest has finished. **important**:%BR% For the script to run, cmssw and grid environmental variables has to be set (done by standaloneTester).%BR% For the IB runs, we have to use custom CRAB build, since they're not supported by default. I set up one on vocms101 (/build/bbozsogi/CRAB_2_7_5), currently the script runs on this machine. Basically the script: * creates a crabCAF directory * checks out http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/Configuration/PyReleaseValidation/data/cmsDriver_standard_hlt.txt * searches for jobs meant to be run on the caf * sets up directories for each of them * runs cmsDriver.py with --no_exec option * creates the crab.cfg file * send the jobs * waits for the results * copy the logs and a pickled dictionary with some basic parsed info about the jobs to the IB's AFS area, under _cafQAlogs/<job_name>/_ * sends a mail containing all the output from crab and the parsed info (crabCAF.log) ---+++USAGE I'll try to keep the =crabRun.py --help= up-to-date :) %BR% By running the script without parameters, it does the things listed above. %BR% You can change the default crab.cfg parameters (see CafQADefaults) by: <verbatim> crabRun.py -c 'USER:email=bbozsogi@cern.ch,CMSSW:events_per_job=2000' </verbatim> You can send custom jobs to the CAF by using option =-inputCmd='cmsDriver.py ...' -d='<datasetpath>'= . %BR% In this case it runs the cmsDriver.py with -no_exec option and use that config file as an input. For this, you also have to <verbatim> crabRun.py -d '/Electron/Run2010B-WZEG-v2/RAW-RECO' -i 'cmsDriver.py step2 -s RAW2DIGI,L1Reco,RECO,ALCA:SiStripCalZeroBias+SiStripCalMinBias,DQM --data --datatier RECO --eventcontent RECO --conditions auto:com10 --scenario pp --no_exec --magField AutoFromDBCurrent --process reRECO --customise Configuration/DataProcessing/RecoTLR.py --cust_function customisePPData' </verbatim> ---+++PICKLE The pickle file contains a dictionary(=logData=) with the most important infos about the job.%BR% it has a dictionary for every logFile in a stucture like: <verbatim> logData[logName] = { 'JobExitCode' = exitcode 'files' = ['file1.root', 'file2.root', ...] 'SE_PATH' = '/castor/.../' 'MSG' = [((startNum, endNum), 'errorMessage'), ...] } </verbatim> The 'MSG' part is the most important, it's basically every block in the logs between =%MSG= tags. A way to parse it (used it for the crabCAF.log): <verbatim> for key, value in logData.items(): self.log.write(key+': {\n') for key2, value2 in value.items(): if key2 == 'MSG': map(lambda x: self.log.write('---'+key2+': '+'('+str(x[0][0])+'-'+str(x[0][1])+'):\n'+x[1]), value2) elif key2 == 'files': self.log.write('---'+key2+': '+', '.join(value2).split()[0]) self.log.write('\n') else: self.log.write('---'+key2+': '+value2) self.log.write('\n') self.log.write('}\n') self.log.flush() </verbatim> ---+++ISSUES Now, the cronjob is running under my user. We have to port it at some point to cmsbuild maybe. %BR% I have sometimes IOError on the statusFiles, need to check why.%BR% Some more error protection... -- Main.BalazsBozsogi - 17-Nov-2010
Edit
|
Attach
|
Watch
|
P
rint version
|
H
istory
:
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r1 - 2010-11-17
-
BalazsBozsogi
Home
Plugins
Sandbox for tests
Support
Alice
Atlas
CMS
LHCb
Public Webs
Sandbox Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
View
Raw View
PDF version
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
Cern Search
TWiki Search
Google Search
Sandbox
All webs
Edit
Attach
Copyright &© 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use
Discourse
or
Send feedback