<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://t2bwiki.iihe.ac.be/index.php?action=history&amp;feed=atom&amp;title=Crabpage</id>
	<title>Crabpage - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://t2bwiki.iihe.ac.be/index.php?action=history&amp;feed=atom&amp;title=Crabpage"/>
	<link rel="alternate" type="text/html" href="https://t2bwiki.iihe.ac.be/index.php?title=Crabpage&amp;action=history"/>
	<updated>2026-06-06T07:58:56Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://t2bwiki.iihe.ac.be/index.php?title=Crabpage&amp;diff=70&amp;oldid=prev</id>
		<title>Maintenance script: Created page with &quot; == How to submit jobs with crab ==  To submit jobs with Crab you have to do following steps:  *Make sure that the CMS/Crab environment is set up  === Setup the Crab env...&quot;</title>
		<link rel="alternate" type="text/html" href="https://t2bwiki.iihe.ac.be/index.php?title=Crabpage&amp;diff=70&amp;oldid=prev"/>
		<updated>2015-08-26T12:28:24Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; == How to submit jobs with crab ==  To submit jobs with Crab you have to do following steps:  *Make sure that the CMS/Crab environment is set up  === Setup the Crab env...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
== How to submit jobs with crab ==&lt;br /&gt;
&lt;br /&gt;
To submit jobs with Crab you have to do following steps:&lt;br /&gt;
&lt;br /&gt;
*Make sure that the CMS/Crab environment is set up&lt;br /&gt;
&lt;br /&gt;
=== Setup the Crab environment ===&lt;br /&gt;
*login to a machine where the Crab software is installed&lt;br /&gt;
  e.g: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh -X &amp;lt;tt&amp;gt;whoami&amp;lt;/tt&amp;gt;@master2.iihe.ac.be&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*setup the environment&lt;br /&gt;
**source the CMS environment&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  setenv VO_CMS_SW_DIR /msa3/cmssoft&lt;br /&gt;
  source $VO_CMS_SW_DIR/cmsset_default.csh ## initialize the cms env&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
**source the Crab environment&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  source /msa3/crab/latest/crab.csh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*next go into your project directory and run eg (maybe replace scramv1 by scram and -sh by -csh)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  eval &amp;lt;tt&amp;gt;scramv1 runtime -csh&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Note that you can writ this commands in your .cshrc file&lt;br /&gt;
&lt;br /&gt;
=== Adjust the crab.cfg to your specific needs ===&lt;br /&gt;
&lt;br /&gt;
*Go to your working directory and copy the example crab.cfg from the working directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  cp $CRABDIR/python/crab.cfg .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*This file is the config for Crab&lt;br /&gt;
**This file has different sections indicated with &amp;#039;[]&amp;#039; &lt;br /&gt;
**[CMSSW]: CMSSW related: (number of events, cfg file, ...)&lt;br /&gt;
**datasetpath = [string that describes dataset]. You can find this on DBS discovery page.&lt;br /&gt;
**pset = [the name of the Pset which fits your code]. This is the config file which you use to a &amp;#039;cmsRun&amp;#039; in an interactive run. Make sure it works before submitting to the grid&lt;br /&gt;
**output_file = [The name for your output file]. Important: be consistent with the name inside your pset. Of course you can give more then one (comma separated)&lt;br /&gt;
**total_number_of_events = [number of events you want to acces, -1 for all data]&lt;br /&gt;
**Crab will work out the right number of evts/jobs according to the user requests: evts/job or nomber of jobs&lt;br /&gt;
***events_per_job = [number of events accessed by a single job]&lt;br /&gt;
***numbers_of_jobs = [number of jobs you want to run]&lt;br /&gt;
**[USER]: user related: (where to store the output, ...)&lt;br /&gt;
**return_data = [0|1]: Send output_file with stdout, stderr to User interface&lt;br /&gt;
**copy_data = [0|1]: Copies output_file. If copy_data = 1, you have to specify storage_element = [name of the storage element to copy output files to] and storage_path = [path on the SE]. Important: crab makes the directory for you on the storage (if you have the permission), but the output file allready exists, the output file won&amp;#039;t be written to storage.&lt;br /&gt;
**[EDG]: grid related: ...&lt;br /&gt;
&lt;br /&gt;
=== Create and submit a crab job ===&lt;br /&gt;
&lt;br /&gt;
*Before you can submit your job you have to prepare everything that is needed&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
crab -create&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*This will create a directory crab_0_&amp;lt;date&amp;gt;_&amp;lt;time&amp;gt; which contains:&lt;br /&gt;
**job: contains CMSSW.cfg (config file for executable) and CMSSW.sh &lt;br /&gt;
**res: output from &amp;#039;crab -getoutput&amp;#039; comes her (CMSSW_000001.stderr and CMSSW_000001.stderr)&lt;br /&gt;
**share: contains jobsubmission files and info&lt;br /&gt;
**log: contains log files with crab output&lt;br /&gt;
&lt;br /&gt;
*Once everything is created you can submit the job. By default it will submit all the jobs, specify N: number of jobs you want to submit&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
crab -submit &amp;lt;N&amp;gt; -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{TracNotice|{{PAGENAME}}}}&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>