Run CMSSW jobs at a local machine

To setup a CMSSW environment, the local users should do as follows:

# first setup grid environment

source /opt/osg/setup.sh

# setup CMS software environment to use CMSSW that are available at the site
source /cvmfs/cms.cern.ch/cmsset_default.sh
  

# setup cvs root
# for users want to check out CMSSW outside of cern anonymous
CVSROOT=:pserver:anonymous@cmscvs.cern.ch:/cvs_server/repositories/CMSSW
export CVSROOT
cvs login 
#at the prompt enter the password 98passwd

 

# for users want to check out using Kerberos V ticket

CVSROOT=:gserver:cmscvs.cern.ch:/cvs_server/repositories/CMSSW
export CVSROOT
kinit username@CERN.CH
#at the prompt, enter your CERN AFS password

 


# create a local working area of CMSSW

cmsrel CMSSW_version   // or scram project CMSSW CMSSW_version


#checkout CMSSW source code to your local working area

cd CMSSW_version/src 
cvs co -r CMSSW_version PhysicsTools/PatExamples

 

# build the source code

cd PhysicsTools/PatExamples
cmsenv       # or eval `scram runtime -sh` 
scram b
# run the executable file
cd ../
cmsRun -p test/testRecoGeometry.cfg
output will be shown on the screen

 

 

# access your AFS directory

kinit AFS_USERNAME@CERN.CH
cd /afs/cern.ch/user/X/XYZ