This tutorial exercises the two primary CRAB workflow performing an analysis task on a dataset using the sandbox and a storage element to retrieve output.
Recipe for the tutorial
For this tutorial we will use:
CMSSW_1_3_1
an already prepared CMSSW analysis code to analyze a Higgs->ZZ->4mu sample, which replicates a real analysis scenario.
Location:
cmsuaf.fnal.gov
CRAB_1_5_2
using the central installation available at FNAL.
The example is written to use the csh shell family
If you want to use sh replace csh with sh.
Setup local Environment and prepare user analysis code
In order to submit jobs to the Grid, you must have access to a LCG or OSG User Interface (LCG UI). It will allow you to access WLCG- and OSG-affiliated resoures in a fully transparent way.
LXPLUS users can get an LCG UI via AFS by:
Most users (particularly those on LXPLUS or at FNAL) do not need to install CRAB. They only need to set it up.CRAB is intended to be installed in a private area for use by a single person, or in a common area for use by all system users. A public installation is available on CERN's LXPLUS and FNAL.
At CERN on LXPLUS, users may access CRAB at (shown for arbitrary version X_Y_Z):
/afs/cern.ch/cms/ccs/wm/scripts/Crab/CRAB_X_Y_Z
At FNAL, users may access CRAB at (shown for arbitrary version X_Y_Z):
/uscmst1/prod/grid/CRAB_X_Y_Z
To know the latest release check CRAB web page or proper HyperNews forum.
Setup on lxplus:
In order to setup and use CRAB from any directory, source the the script crab.(c)sh located in /afs/cern.ch/cms/ccs/wm/scripts/Crab/, which always points to the latest version of CRAB. After the source of the script it's possible to use CRAB from any directory (typically use it from your CMSSW working directory).
The first time you call the CRAB initialization script, you'll get a message like: User-boss DB not installed: run configureBoss. You have to Initialize BOSS, one of CRAB's sub-components, by executing the following command:
$CRABDIR/configureBoss
BOSS will create two directories in your home directory:
boss
.bossrc
which should not be removed.
NOTE:
Sourcing the crab.sh|csh script has to be done after the installation and at the start of every new session, but you need to run configureBossonly the very first time.
Setup on cmsuaf.fnal.gov / cmslpc.fnal.gov:
In order to setup and use CRAB from any directory, source the the script crab.(c)sh located in /uscmst1/prod/grid/CRAB/, which always points to the latest version of CRAB. After the source of the script it's possible to use CRAB from any directory (typically use it from your CMSSW working directory).
source /uscmst1/prod/grid/CRAB/crab.csh
The first time you call the CRAB initialization script, you'll get a message like: User-boss DB not installed: run configureBoss. You have to Initialize BOSS, one of CRAB's sub-components, by executing the following command:
$CRABDIR/configureBoss
BOSS will create two directories in your home directory:
boss
.bossrc
which should not be removed.
NOTE:
Sourcing the crab.sh|csh script has to be done after the installation and at the start of every new session, but you need to run configureBossonly the very first time.
Data selection
To select data you want to access, use the DBS web page where available datasets are listed DBS Data Discovery
(see links on CRAB home page).
For this tutorial we'll use :
Modify the CRAB configuration file crab.cfg according to your needs: a fully documented template is available at $CRABDIR/python/crab.cfg . For guidance, see the list and description of configuration parameters. For this tutorial, the only relevant sections of the file are [CRAB], [CMSSW] and [USER] and [EDG].
The configuration file should be located at the same location as the CMSSW parameter-set to be used by CRAB. Please change directory to :
Once your crab.cfg is ready and the whole underlying environment is set up, you can start to run CRAB.
CRAB supports a command line help which can be useful for the first time. You can get it via:
crab -h
in particular there is a HOW TO RUN CRAB FOR THE IMPATIENT USER section where the base command are reported.
Job Creation
The job creation checks the availability of the selected dataset and prepares all the jobs for submission according to the selected job splitting specifyed on the crab.cfg
The creation process creates a CRAB project directory (default: crab_0__