Running M5 data on a local machine
WARNING: This page is obsolete.

23-Nov-2007: Updated to use 13.0.30.15 and merged Isabel's much simpler recipe.

If you are later submitting a grid job using Panda, make sure that the environnment variable PATHENA_GRID_SETUP_SH is set. For example, if gLite was installed from a yum repo, it should be:
export PATHENA_GRID_SETUP_SH=/etc/profile.d/grid-env.sh
This assumes that you have properly setup your local machine with the correct tools; if not, please see the
Computing Tips page on how to setup Athena, gLite and DDM tools.
The procedure to run on your local machine is similar to that outlined for lxplus.
Here, we will note the differences in blue.
- Initial Setup; do the following once
mkdir -p ~/Tutorial/point1/cmthome
cd ~/Tutorial/point1/cmthome
add a requirements file (Change where your SITEROOT is) such as:
#############################################################
set CMTSITE STANDALONE
set SITEROOT /ATLAS_LOCAL_ROOT/Athena/Kits/13.0.30
macro ATLAS_DIST_AREA ${SITEROOT}
apply_tag simpleTest
apply_tag oneTest
macro ATLAS_TEST_AREA "" \
12.0.6 "${HOME}/Tutorial/12.0.6" \
12.0.7 "${HOME}/Tutorial/12.0.7" \
13.0.10 "${HOME}/Tutorial/13.0.10" \
13.0.20 "${HOME}/Tutorial/13.0.20" \
13.0.30 "${HOME}/Tutorial/13.0.30" \
13.0.30.6 "${HOME}/Tutorial/13.0.30.6" \
13.0.30.8 "${HOME}/Tutorial/13.0.30.8" \
point1 "${HOME}/Tutorial/point1"
use AtlasLogin AtlasLogin-* $(ATLAS_DIST_AREA)
#############################################################
and configure:
source /afs/cern.ch/sw/contrib/CMT/v1r20p20070720/mgr/setup.sh
cmt config
- For every login, do (assuming you have gLite automatically sourced for you):
cd ~/Tutorial/point1
source cmthome/setup.sh -tag=point1,13.0.30.15,32,runtime
voms-proxy-init -voms=atlas:/atlas/ca
- Check out and compile the packages (the Panda package is checked out in case you want to run this on the grid later). You will need a Kerberos tocket first. Make sure Kerberos is configured on your machine
kinit -4 -5 desilva@CERN.CH
cd ~/Tutorial/point1
cmt co -r RecExCommission-00-01-72 Reconstruction/RecExample/RecExCommission
cd ~/Tutorial/point1/Reconstruction/RecExample/RecExCommission/cmt
cmt br cmt config
source setup.sh
gmake
cd ~/Tutorial/point1
cmt co PhysicsAnalysis/DistributedAnalysis/PandaTools
cd ~/Tutorial/point1/PhysicsAnalysis/DistributedAnalysis/PandaTools/cmt
cmt br cmt config
source setup.sh
gmake
cd ~/Tutorial/point1/Reconstruction/RecExample/RecExCommission/run
get_files RecExCommission_topOptions.py
- Edit RecExCommission_topOptions.py by adding the following lines just before including RecExCommissionFlags_jobOptions.py:
# setup DBReplicaSvc to choose closest Oracle replica
PoolSvc=Service("PoolSvc")
PoolSvc.SortReplicas=True
DBReplicaSvc=Service("DBReplicaSvc")
DBReplicaSvc.UseCOOLSQLite=False
and the following lines just after including RecExCommissionFlags_jobOptions.py:
ATLASCosmicFlags.useLocalCOOL = True
ATLASCosmicFlags.doSim = False
ATLASCosmicFlags.FullFileName = ["/home/desilva/m5Data/daq.m5_combined.0028940.Default.L1TT-b11100011.LB0000.SFO-1._0001.data"]
and substituting
theApp.EvtMax = 100
for
theApp.EvtMax = ATLASCosmicFlags.EvtMax
Note the datafile was downloaded to my local machine using dq2_get; assuming you have dq2 tools setup on your machine:
mkdir -p /home/desilva/m5Data
cd /home/desilva/m5Data
dq2_get -v -r M5.0028940.Default.L1TT-b11100011.RAW.v010803 daq.m5_combined.0028940.Default.L1TT-b11100011.LB0000.SFO-1._0001.data
- In a new terminal window, do the following to create a pool file catalog for the conditions data:
cd ~/Tutorial/point1/Reconstruction/RecExample/RecExCommission/run
ls /afs/cern.ch/atlas/conditions/poolcond/vol3/comcond.000002.lar_conditions.recon.pool.v0000/*.root | awk '{print "pool_insertFileToCatalog "$1""}' > doPool.sh
source doPool.sh
(This could be done in one step if you append "| sh" to the first line, but to be safe, look at the doPool.sh file first. ) This will run very slowly since it is looking at the conditions files over afs.
Alternately ...
If you have space, you can copy the files to your local desktop (8GB for M5 as of 6Nov07):
cd ~/Tutorial/point1/Reconstruction/RecExample/RecExCommission/run
cp -R /afs/cern.ch/atlas/conditions/poolcond/vol3/comcond.000002.lar_conditions.recon.pool.v0000 /home/desilva/m5Conditions/
ls /home/desilva/m5Conditions/comcond.000002.lar_conditions.recon.pool.v0000/* | awk '{print "pool_insertFileToCatalog "$1""}' |sh
- Run interactive or batch with the athena command:
cd ~/Tutorial/point1/Reconstruction/RecExample/RecExCommission/cmt
source setup.sh
cd ~/Tutorial/point1/PhysicsAnalysis/DistributedAnalysis/PandaTools/cmt
source setup.sh
cd ~/Tutorial/point1/Reconstruction/RecExample/RecExCommission/run
athena -s RecExCommission_topOptions.py
This succeeded ! However, note that you need to make one more change so that the database is accessed correctly.
If you run on the grid, you should undo this change before submitting the job with pathena or ganga.
Edit RecExCommission_topOptions.py and add the following line to the end of the "if ATLASCosmicFlags.doLAr:" block, just after including ("LArConditionsCommon/LArConditionsCommon_comm_jobOptions.py":
PoolSvc.ReadCatalog.remove('prfile:poolcond/PoolCat_comcond_castor.xml')
(this will crash if a catalog file of that name has NOT been added, but that's OK because it's an ugly kludge anyhow so you don't want to leave it around once it isn't needed anymore).
And then run.
--
AsokaDeSilva - 05 Nov 2007