Kalanand's July 2008 Log

   June 2008   
July 2008
   August 2008   

July 1st


1.) Set up environment
source /uscmst1/prod/grid/CRAB/crab.csh
voms-proxy-init -voms cms
2.) Modify the CRAB configuration file "crab.cfg" (template available at $CRABDIR/python/crab.cfg)
crab -create -cfg crab.cfg
to create jobs that can be submitted to remote machnines.
3.) Make directory on the file server to store the output files. Also set permission 775, i.e., group-writable.
mkdir /pnfs/cms/WAX/resilient/kalanand/trash
chmod +775 /pnfs/cms/WAX/resilient/kalanand/trash
rfmkdir /castor/cern.ch/user/u/kalanand/trash
rfchmod +775 /castor/cern.ch/user/u/kalanand/trash
4.) Now subit the above created jobs and check status
crab -submit -c < dire_name>
crab -status -c < dire_name>
crab -getoutput all -c < dire_name>
5.) Other options:
crab -kill 1 -c < dire_name>
where "1" can be replaced with any combination of job numbers and job ranges separated by comma (e.g., 1, 2, 3-8).
crab -resubmit 1 -c < dire_name>
crab -clean all -c < dire_name>
6.) For CRAB error exit codes please see https://twiki.cern.ch/twiki/bin/viewauth/CMS/JobExitCodes

July 8th

To submit jobs to condor queue via crab:

step 0: In the crab.cfg file (in the [CRAB] section), set the scheduler to condor:
       scheduler = condor 
step 1: Do the following:
       echo "source /uscmst1/prod/sw/cms/shrc prod" > ~/.profile
step 2: Set up your grid proxy:

       voms-proxy-init -voms cms  
Step 3: Set up the environment:
       source /uscmst1/prod/grid/gLite_SL5.csh
       source /uscmst1/prod/grid/CRAB/crab.csh
Now follow the above instructions to run a crab job.

July 11th

To compile a C++ file natively on my Mac outside of ROOT

Suppose the name of the file is myCppFile.C. Then to compile it, I would do
make myCppFile
To run this compiled file:

To run ROOT in batch/background mode

root -b -q myMacro.C+ >& a.log &
The "-b" runs in match mode, "-q" exits ROOT after running the macro.

July 16th

How to create a CVS branch

cvs tag -b < new_branch_name>
cvs update -r < new_branch_name>
cvs commit 
The above commit command has the same effect as the following:
cvs commit -r < new_branch_name>

July 21st

Word replace

To replace a word in every file
for fname in $(find . -name "*" -print)
sed '/word/s/old_word/new_word/g' ${fname} > ${fname}.new &&
mv ${fname}.new ${fname}

July 23rd

Rename files

To rename a file recursively:
rename crab crabjob `find .\ -name crab_*.cfg`

July 29th

Temporary and permanent storages at Fermilab

3DayLifetime area:
FNAL dCache store area (files here can be published in DBS):

Go to June's log

Last modified: Tue Jul 29 18:37:49 CST 2008