My cookbook to use Grid and Crab

Disclaimer: this is like a recipe, no major explanations are given here

Grid certificate

  • Fill the form to obtain the grid certificate from the certification authority ([[][LIPCA]])
  • Import the certificate to your browser
  • Save a local backup of your certificate. In Firefox do: Edit > Preferences > Encryption > View Certificates > LIPCA (user) > Backup. This will save a p12 file
  • Create the .globus directory in ${HOME}
  • openssl pkcs12 -in usercert.p12 -clcerts -nokeys -out $HOME/.globus/usercert.pem
  • openssl pkcs12 -in usercert.p12 -nocerts -out $HOME/.globus/userkey.pem
  • Change the permissions in userkey.pem and usercert.pem so that only you can read and write these files
You can get more info on how to get the certificate from this link. After you got your certificate you have to register it with the CMS VO. This is done at this site. After your request has been accepted you are ready to run on the grid.

Setup environment

I use the following calls to setup the environment for CMSSW and CRAB (from my CMSSW installation dir).

   source /afs/
   source /afs/

The order is important! Note also that the last call should be done only if you want to start the proxy by hand. Otherwise you should let CRAB do it by you. The first time you want to use CRAB you must also setup BOSS: $CRABDIR/configureBoss

Note: If you want to start the proxy by hand you can use the following command:

    voms-proxy-init -voms cms -valid <H>:<M>

Start job

  • create a crab.cfg in your test directory (see example here)
  • create the jobs: crab -create
  • submit the jobs: crab -submit all -c
  • check the status crab -status -c
  • retrieve the output crab -getoutput all -c
More details in here.

Tip : If the job produces a ROOT output which is split into several files you can use

    ${ROOTSYS}/bin/hadd ouput_merged_file.root file1.root file2.root ... fileN.root 
to produce a single merged ROOT file with the output of the analysis.

-- PedroSilva - 11 Mar 2008

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r4 - 2009-02-26 - PedroSilva
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 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