Submit CMSSW Jobs Using Condor
- Setup your Environment
You need to setup environment as explained in CMSSW Environment Setup.
- Create a new project area
cd ~ cmsrel CMSSW_8_0_1 cd CMSSW_8_0_1/src/ cmsenv
- Create an EDAnalyzer
First, create a subsystem area. The actual name used for this directory is not important, we'll use Demo. From the src directory, make and change to the Demo area.
mkdir Demo cd Demo
Note that if you do not create the subsystem area and create the module directly under the src directory, your code will not compile. Create the "skeleton" of an EDAnalyzer module (see SWGuideSkeletonCodeGenerator for more information)mkedanlzr DemoAnalyzer
The mkedanlzr script has generated the source and BuildFile'DemoAnalyzer/src/DemoAnalyzer.cc' and'DemoAnalyzer/BuildFile.xml' respectively. Copy the source and BuildFile so that it prints the number of tracks in an event.cd DemoAnalyzer cp /grp/cmw/www/Tutorial/Condor/BuildFile.xml Demo/DemoAnalyzer/plugins/ cp /grp/cmw/www/Tutorial/Condor/DemoAnalyzer.cc Demo/DemoAnalyzer/plugins/
- Compile the code
scram b
- Copy the necessary scripts
cp /grp/cms/www/Tutorial/Condor/job_template_condor.csh . cp /grp/cms/www/Tutorial/Condor/createcondorjobs.csh . cp /grp/cms/www/Tutorial/Condor/submit_job.csh .
- Change the CMSSW_RELEASE, initialdir, SRCDIR, OUTDIR, and job.py inside of job_template_condor.sh as necessary. Then submit jobs as follows.
./createcondorjobs.csh jobname numberofeventsperjob numberofjobs ./submit_job.csh jobname numberofjobs
- To know the running status of your submitted job(s)
condor_q