TWiki
>
AtlasCanada Web
>
ComputingPage
>
VMImage
>
July2008Tutorial
(2008-07-26,
AsokaDeSilva
)
(raw view)
E
dit
A
ttach
---+ July 2008 Tutorial %TOC% ---++ Introduction These are supplementary instructions to the [[http://indico.cern.ch/conferenceDisplay.py?confId=36885][July 2008 Tutorial]]. They are meant to be used on the [[https://twiki.atlas-canada.ca/bin/view/AtlasCanada/VMImage][atlas-vm]] virtual machine (VM) version 1.06. You do not need to login to lxplus to do the tutorial if you use atlas-vm. Please refer to the Tutorial links and follow or substitute the instructions as listed below. If there are no supplementary instructions for a particular session, it means that the Tutorial instructions work as-is on the atlas-vm. When following the tutorial instructions when using atlas-vm, please note that you should not source any scripts that have /afs/cern.ch in its path. Nor should your requirements file or input data have any /afs/cern.ch paths in it. (If it does, you will be running code over the network which will be very slow.) ---+++ Software All required software is available locally on atlas-vm: * You just need to type =setupATLAS= in your account and follow the instructions to setup !DQ2Client, Ganga, etc, when you need it. * When checking out packages from CVS, remember to get a kerberos ticket first, for example: =kinit -5 desilva@CERN.CH=. * To submit jobs to the grid, or to get datasets with DQ2, get a grid proxy first, for example: =voms-proxy-init -voms=atlas:/atlas/ca= (leave out the :/atlas/ca if you are not a Canadian). ---+++ Data The following datasets will be used for the tutorial; they are large and whenever possible, the jobs should be submitted to the grid. If you want to download a dataset for local testing, I recommend copying only one files from each dataset: <verbatim> # go to the data directory in atlas-vm cd /data/$USER # setup the local DQ2 software setupATLAS localSetupDQ2Client # This will get a 1.6 GB file from the dataset (needed for the DPD Tutorial) dq2-get -f fdr08_run2.0052280.physics_Egamma.merge.AOD.o3_f8_m10._0001.1 fdr08_run2.0052280.physics_Egamma.merge.AOD.o3_f8_m10 Querying DQ2 central catalogues to resolve datasetname fdr08_run2.0052280.physics_Egamma.merge.AOD.o3_f8_m10 # This will get a 126 MB file from the dataset (needed for the PyAthena Tutorial) dq2-get -f AOD.022496._00001.pool.root.1 valid1.005200.T1_McAtNlo_Jimmy.recon.AOD.e322_s435_r432_tid022496 # This will get a 39 MB file which is needed for the EventView Tutorial cp /afs/cern.ch/atlas/offline/external/FullChainTest/long/14.1.0.4/root_files/AllBasicSamples.AOD.pool.root ./ </verbatim> ---+++ Releases atlas-vm contains 14.2.10 but some of the tutorial sections seem to need 14.2.0. In some cases, this may not matter but where it fails (marked below by %ICON{choice-no}%), you have to use 14.2.0. You can install it on the VM (it will use up approximately 7 GB more disk space) by logging in as atlasadmin and typing the command below, or, (%ICON{tip}% easier - you can just download and run a second [[https://twiki.atlas-canada.ca/bin/view/AtlasCanada/VMImage][atlas-vm (1.04)]] which has 14.2.0 installed - you can run both at the same time !) <verbatim> # Do this if you want to install 14.2.0 on atlas-vm instead of runnng a second virtual machine (atlas-vm version 1.04) $ATLAS_LOCAL_ROOT_BASE/utilities/installSW.sh --name=Athena --platform=i686 --version=AtlasProduction_14_2_0_i686_slc4_gcc34_opt --mirror=http://pacman.atlas-canada.ca/ATLAS.mirror --installPath=Kits_SL4/14.2.0 </verbatim> ---+++ Tips Finally, here are some tips to keep in mind when you go through the Tutorial; these should only be done after doing the =source ~/cmthome/setup.sh -tag= command (see the sections below). ---++++ !PyUtils I recommend using the !PyUtils package to manage your software compilations. These are the instructions: <verbatim> # checkout the PyUtils package cd $TestArea cmt co -r PyUtils-00-03-18 Tools/PyUtils # You need to do the next 4 steps after you checkout any new packages to $TestArea Tools/PyUtils/bin/setupWorkArea.py cd $TestArea/WorkArea/cmt cmt bro cmt config cmt bro gmake # Use this run directory from now on ... cd $TestArea/WorkArea/run </verbatim> ---++++ Athena jobs to the Grid Checkout !PandaTools and use pathena to submit athena jobs to the grid (instead of using Ganga to submit to the Panda backend). The instructions to set this up are; <verbatim> # checkout PandaTools (the latest version) and build it. cd $TestArea cmt co PandaTools PhysicsAnalysis/DistributedAnalysis/PandaTools cd PhysicsAnalysis/DistributedAnalysis/PandaTools/cmt gmake # example: go to my run directory and submit the job to the grid cd $TestArea/WorkArea/run # pathena --help will show you the options (you can, for example, submit to the CA cloud with --cloud=CA). pathena --inDS=fdr08_run2.0052280.physics_Egamma.merge.AOD.o3_f8_m10 --outDS=user.AsokaDeSilva.14.2.10.DPD --nFiles=1 AODtoDPD.py </verbatim> ---++ (16 July, 10:15) Setting up your account [[https://twiki.cern.ch/twiki/bin/view/Atlas/RegularComputingTutorial#Setting_up_your_account][Reference]] * In "Setting up CMT", there is already a ~/cmthome/requirements file in your account. (Note that this has 32, opt and setup specified already.) To setup, do the following: <verbatim> cd ~/cmthome source $ATLAS_LOCAL_ROOT/Athena/Kits_SL4/14.2.10/CMT/v1r20p20080222/mgr/setup.sh cmt config mkdir -p ~/scratch0/athena/AtlasOffline-14.2.10 </verbatim> * You should first create your $TestArea as described above; create the directory and then redo the source ~/cmthome/setup.sh if you see an error such as: <verbatim> AtlasLogin: WARNING - test directory [/home/desilva/scratch0/athena/AtlasOffline-14.2.10] doesn't exist - the runtime environment won't reflect it </verbatim> ---++ (16 July, 10:45) Running Athena [[https://twiki.cern.ch/twiki/bin/view/Atlas/RegularComputingTutorial#Running_Athena][Reference]] * To setup the ATLAS software, you can use 14.2.10 instead of 14.2.0; to do this, type the following to setup the runtime environment: <verbatim> source ~/cmthome/setup.sh -tag=14.2.10 </verbatim> ---++ (16 July, 13:30) The Athena Simulation Chain [[https://twiki.cern.ch/twiki/bin/view/Atlas/RegularComputingTutorial#Running_the_full_simulation_chai][Reference]] * For testing purposes, you can try to use the 14.2.10 release in atlas-vm; just type =source ~/cmthome/setup.sh -tag=14.2.10= to setup the cmtpath. * Warning - running these examples may be very slow - they are cpu and memory intensive. * %ICON{choice-no}% Reconstruction will fail; for example, see this [[https://hypernews.cern.ch/HyperNews/Atlas/get/Prelimbugs/1026.html][HyperNews thread]] and also [[https://hypernews.cern.ch/HyperNews/Atlas/get/Prelimbugs/1027.html][this one]] for more information. You probably need 14.2.0 for this exercise - you can use atlas-vm 1.04, or install 14.2.0 as described at the top of this page. ---++ (16 July, 15:00) An Introduction to the Grid [[https://twiki.cern.ch/twiki/bin/view/Atlas/RegularComputingTutorial#Getting_ready_to_use_the_Grid][Reference]] * Do not source any /afs/.../grid_env.sh script; a local version of gLite is available and it is already setup when you log in. * Canadians, type =voms-proxy-init --voms atlas:/atlas/ca=. ---++ (16 July, 16:15) Running Athena on the Grid [[https://twiki.cern.ch/twiki/bin/view/Atlas/RegularComputingTutorial#The_simplest_possible_GANGA_job][Reference]] * Do not source /afs/.../ganga/...setup-atlas.sh; instead, type =setupATLAS= followed by =localSetupGanga= to use the local version of Ganga that is installed on atlas-vm. Note that if you are not a Canadian, you need to edit ~/.gangarc and remove the /atlas/ca role from the voms as outlined on the [[https://twiki.atlas-canada.ca/bin/view/AtlasCanada/VMImage#Initial_Setup_user][Initial Setup - user]] page. * You don't need to do a "ganga -g" - there is already a ~/.gangarc file availeble on your home directory. * ("Athena on the Grid using Ganga" section); cmtsetup 14.2.10 from within Ganga and it will work. ---++ (17 July, 10:00) Physics analysis with an Athena algorithm (!PyAthena) [[https://twiki.cern.ch/twiki/bin/view/Atlas/PyAthenaTutorialCERN140210][PyAthena Reference]] * type =source ~/cmthome/setup.sh -tag=14.2.10= to setup the cmtpath * In jobo.py, change the line =svcMgr.EventSelector.InputCollections= to point to where you have the dataset fetched from DQ2 (in /data/$USER/ - see the top of this page). ---++ (17 July, 10:00) Physics analysis with an Athena algorithm [[https://twiki.cern.ch/twiki/bin/view/Atlas/RegularComputingTutorial#Running_physics_analysis_with_At][Reference of second Twiki link]] * You can try this in 14.2.10 instead of 14.2.0 (note the different package tag versions below for 14.2.10); type =source ~/cmthome/setup.sh -tag=14.2.10= to setup the cmtpath. (You can get the package versions for a particular release, for example, by typing =cmt show versions !PhysicsAnalysis/BPhys/BPhysAnalysisObjects=.) * Instead of copying all the files from share/*, type =get_files !AnalyzeJpsiphi.py= when in your run directory. * %ICON{choice-no}% Running the job will abort because of the following error in 14.2.10 ( You probably need 14.2.0 for this exercise - you can use atlas-vm 1.04, or install 14.2.0 as described at the top of this page.). <verbatim> ... GeoModelSvc ERROR *** *** Geometry configured through jobOptions does not match TagInfo tags! *** *** </verbatim> * Note that you could have submitted the above job to the grid using Panda - see the next section (DPD Making). ---++ (17 July, 11:00) DPD Making [[https://twiki.cern.ch/twiki/bin/view/Atlas/PatTutorial140210][Reference]] * One/Every-time setup, do this instead: <verbatim> # if you have not already done this before ... cd ~/cmthome source $ATLAS_LOCAL_ROOT/Athena/Kits_SL4/14.2.10/CMT/v1r20p20080222/mgr/setup.sh cmt config mkdir -p ~/scratch0/athena/AtlasOffline-14.2.10 # everytime you login source $HOME/cmthome/setup.sh -tag=14.2.10,groupArea cd $TestArea </verbatim> * Copy the file =$GroupArea/AODtoDPD.py= to your run directory. * in =AODtoDPD.py=, change the input file to what you downloaded with DQ2 (the line is =svcMgr.EventSelector.InputCollections=. This should only be for testing purposes; you should be running the job on the grid instead.) * For submission of the job to the grid, this is what I did after setting up !PandaTools as [[July2008Tutorial#Athena_jobs_to_the_Grid][instructed]]: <verbatim> pathena --inDS=fdr08_run2.0052280.physics_Egamma.merge.AOD.o3_f8_m10 --outDS=user.AsokaDeSilva.14.2.10.DPD --nFiles=1 AODtoDPD.py </verbatim> ---++ (17 July, 15:30) !EventView Tutorial [[https://twiki.cern.ch/twiki/bin/view/Atlas/EventViewInDPDRel14][Reference]] * Instead of the "Setup for the Tutorial" section, do as directed in the One/Every-time setup [[July2008Tutorial#17_July_11_00_DPD_Making]["DPD Making"]] supplementary information section. * copy the tutorial1.py file from /afs/cern.ch as instructed in the tutorial instructions. The datafile should be copied to /data/$USER as instructed at the top of this page. * Instead of a soft link to the input datafile on /afs/cern.ch, do =ln -s /data/$USER/AllBasicSamples.AOD.pool.root AOD.pool.root= before running the job. * when using !AthenaRootAccess, I see this warning but it did not seem to affect anything. <verbatim> [desilva@atlasvm-106 run]$ python -i evInARA.py TClass::TClass:0: RuntimeWarning: no dictionary for class DataLink<EventView,DataProxyStorage<EventView> > is available TClass::TClass:0: RuntimeWarning: no dictionary for class UserDataBlock is available </verbatim> * if you submit the job to the grid with Panda, remember to checkout the !PandaTools package and compile as outlined in the [[July2008Tutorial#Athena_jobs_to_the_Grid][Tips]] section. ---++ (17 July, 17:00) EWPA Tutorial [[https://twiki.cern.ch/twiki/bin/view/Atlas/EWPAinPATTutorialSession][Reference]] * Ignore the "Setup the Environment section" and do as directed in the One/Every-time setup [[July2008Tutorial#17_July_11_00_DPD_Making]["DPD Making"]] supplementary information section. * in =Skeleton_topOptions.py=, comment out the line for the dataset at CERN and include a line for the dataset file you downloaded earlier <verbatim> # comment this line #include ("EWExamples/InputCollections_valid1.005145.PythiaZmumu.recon.AOD.e322_s443_r455.0.py" ) # add this line (equivalent to your dataset location) InputCollections += [ "/data/desilva/valid1.005200.T1_McAtNlo_Jimmy.recon.AOD.e322_s435_r432_tid022496/AOD.022496._00001.pool.root.1" ] </verbatim> * When running the "Making a !D1PD" job, I see the following types of errors but it still ran successfully to completion and created the !D1PD.pool.root file. <verbatim> DataProxy WARNING accessData: conversion failed for data object 239760293/HLTAutoKey__239760293_2 Returning NULL DataObject pointer T_AthenaPoolCustomCnv FATAL Failed to convert persistent object to transient: Unsupported persistent version of Data container AthenaPoolConverter ERROR createObj PoolToDataObject() failed, token = [DB=3C27568C-BD2C-DD11-95DF-00A0D1E505C7][CNT=POOLContainer_TrigTauTracksInfo][CLID=630E4944-7EDE-4938-B189-020DBC0436AE][TECH=00000202][OID=00000055-0000001E] DataProxy </verbatim> * When running the "Accessing EWPA derived ... with !AthenaRootAccess" section, do not copy the !D2PD file from CERN castor; you can use the one you just created in atlas-vm (create a softlink AOD.pool.root to that !D2PD file). However, you will need the ewpa.C file which you can simply copy from lxplus to atlas-vm. ---++ (18 July, 09:30) Tag Usage Tutorial - Tag Browser [[https://twiki.cern.ch/twiki/bin/view/Atlas/EventTagTutorial2008July][Reference]] * Note the location of the tag files you create on /afs/cern.ch and copy it to your run directory (make the appropriate changes in the instructions in the next section.). * Otherwise, if you have problems running later with the tag file you created, use the one for the tutorial: <verbatim> cd $TestArea/run cp /afs/cern.ch/atlas/groups/PAT/Tutorial/AtlasOffline-14.2.10/TAG/fdr08_run2_physics_Egamma_o3_f8_m10_1216280899_user.root ./ </verbatim> ---++ (18 July, 09:30) Tag Usage Tutorial - Using Tag Files * Note that if you only downloaded one file out of the dataset !fdr08_run2.0052280.physics_Egamma.merge.AOD.o3_f8_m10 as instructed above, you will not be able to run on all events in the tag root file since the tags are for events in the entire dataset (the correct way is to submit this to the grid). Otherwise you may have to download all the files in the dataset (~9 G in size). * For Exercise 1.1, do the following to create a pool catalog file (do _not_ copy the /afs/cern.ch/.../PoolFileCatalogRun52280Egamma.xml file). <verbatim> # temporarily move any existing PoolFileCatalog.xml (mv PoolFileCatalog.xml PoolFileCatalog.xml.save) # create a new PoolFileCatalog.xml file with only the following contents: <!-- Edited By POOL --> <!DOCTYPE POOLFILECATALOG SYSTEM "InMemory"> <POOLFILECATALOG> </POOLFILECATALOG> # add the dataset file that you downloaded as instructed at the top of this page pool_insertFileToCatalog /data/$USER/fdr08_run2.0052280.physics_Egamma.merge.AOD.o3_f8_m10/fdr08_run2.0052280.physics_Egamma.merge.AOD.o3_f8_m10._0001.1 # you can repeat the above line to add any number of dataset files. # Tip: to add all files in the dataset which you downloaded, just do # ls -1 /data/$USER/fdr08_run2.0052280.physics_Egamma.merge.AOD.o3_f8_m10/* | awk '{print "pool_insertFileToCatalog "$1""}' | sh # rename the file mv PoolFileCatalog.xml PoolFileCatalogRun52280Egamma.xml # if you had an existing catalog file, restore it cp PoolFileCatalog.xml.save PoolFileCatalog.xml </verbatim> * In exercise 1.1, replace the instructions for !svcMgr.PoolSvc.ReadCatalog with your own !PoolFileCatalogRun52280Egamma.xml file: <verbatim> svcMgr.PoolSvc.ReadCatalog += [ "xmlcatalog_file:PoolFileCatalogRun52280Egamma.xml" ] </verbatim> * To submit to the grid, look at this [[https://twiki.cern.ch/twiki/bin/view/Atlas/EventTagTutorial2008JulyPathena][Panda submission]] page for instructions. (Remember, do not source the grid_env.sh file.) You should have checked out !PandaTools and compiled it as described in the [[July2008Tutorial#Athena_jobs_to_the_Grid][Tips section]]. The summary of the instructions to submit the job are: <verbatim> cd $TestArea/run # this is where your TAG root file should exist (which you created from the web browser ELSSI) # in the example below, it is fdr08_run2_physics_Egamma_o3_f8_m10_1216853201_user.root echo fdr08_run2_physics_Egamma_o3_f8_m10_1216853201_user.root > myinputs.txt pathena --shipInput --inputFileList=myinputs.txt --outDS user.AsokaDeSilva.test.tag.v1 AODtoDPD.py </verbatim> ---++ (18 July, 11:00) ATLANTIS * To install a _standalone_ version of !ATLANTIS on the altasvm, please see these [[InstallAtlantis][installation instructions]]. You can then type =setupATLAS= followed by =localSetupAtlantis= if you followed the instructions in the link. * Another way if to checkout and compile the code for !ATLANTIS in your release; this is outlined in this [[https://twiki.cern.ch/twiki/bin/view/Atlas/PatVancouverTools#Optional_Inspecting_events_with][Vancouver Tutorial]] page. You will need the corresponding tags for 14.2.10 which you can get with =cmt show versions= as shown below <verbatim> cmt show versions graphics/AtlantisJava graphics/AtlantisJava AtlantisJava-09-10-14 /atlas/ATLASLocalRootBase/i686/Athena/Kits_SL4-i686/14.2.10/AtlasAnalysis/14.2.10 # so to checkout and compile this package # (see appropriate instructions above if you use the PyUtils to manage packages), do # cd $TestArea # cmt co -r AtlantisJava-09-10-14 graphics/AtlantisJava # cd graphics/AtlantisJava/cmt # gmake </verbatim> * Note that there is another way to view events [[http://atlas-vp1.web.cern.ch/atlas-vp1/vp1patches.php][VP1]] ---++ (18 July, 11:30) !FileStager [[http://indico.cern.ch/getFile.py/access?sessionId=20&resId=1&materialId=0&confId=36885][Reference]] * To setup, =source setup.sh -tag=14.2.10,notPedantic=. * Instead of =cd !FileStager/cmt/= in the instructions, it should be =cd Database/FileStager/cmt/= * Do not source /afs/cern.ch/.../DQ2Clients/setup.sh. For grid certificate, type =voms-proxy-init -voms=atlas:/atlas/ca= and for DQ2, type =setupATLAS= followed by =localSetupDQ2Client=. * Note that the manager stores files in /tmp; you can (and should for atlas-vm) change this to /data/$USER/tmp/ (after creating the directory). To do this, =export TMPDIR=/data/$USER/tmp/= * Warning: This is an expensive operation because it involves fetching datafiles and deleting them immediately after use. (I did not complete the examples - only looked to see the file fetching / removal mechanism.) If you do a CRTL-C on the athena job, the datafiles will not be deleted and you should do it manually. * If you did this section, I recommend deleting your $TestArea contents (=rm -rf $TestArea/*=) and starting fresh - logout and in and do the =source cmthome/setup.sh -tag=, checking out whatever you need next, etc when you start on another section. ---++ (18 July, 13:30) Physics Analysis on the Grid [[https://twiki.cern.ch/twiki/bin/view/Atlas/GangaShortTutorial5][Reference]] * You can do this in 14.2.10. * Skip the "Ganga Setup on lxplus or afs" section. * For the !AthenaRootAccess example, copy the =gangaARAExample_502.py= file to your run area. Skip the setup instructions preceding this and do instead =source cmthome/setup.sh -tag=14.2.10= followed by =cd $TestArea=. * setup Ganga by typing =setupATLAS= followed by =localSetupGanga=. * When you submit with ganga, remember to change the =--athena_release= to 14.2.10 in the tutorial instructions. If you use the iPython submission, change the appropriate line to substitute for the 14.2.10 release. * For the !UserAnalysis example, these are the instructions (replacing the section); you should consider the [[July2008Tutorial#PyUtils][PyUtils]] package if you checkout more than one package. <verbatim> source cmthome/setup.sh -tag=14.2.10 cd $TestArea cmt co -r UserAnalysis-00-13-03 PhysicsAnalysis/AnalysisCommon/UserAnalysis cd PhysicsAnalysis/AnalysisCommon/UserAnalysis/cmt source setup.sh cmt broadcast gmake cd ../run get_files AnalysisSkeleton_topOptions.py setupATLAS localSetupGanga ganga athena --inDS fdr08_run2.0052283.physics_Muon.merge.AOD.o3_f8_m10 \ --outputdata histos.root --lcg --site LRZ \ AnalysisSkeleton_topOptions.py </verbatim> * The Panda backend has not been configured in the ~/.gangarc file. If you want to use it, then make the following change and restart Ganga in a new terminal window: <verbatim> # edit ~/.gangarc and do replace RUNTIME_PATH as shown here #RUNTIME_PATH = GangaAtlas RUNTIME_PATH = GangaAtlas:GangaPanda </verbatim> * Instead of using Ganga to submit to the Panda backend, I find it much easier to submit it directly with =pathena=; for help, type =pathena --help=. You should have checked out and compiled !PandaTools as instructed in the [[July2008Tutorial#Athena_jobs_to_the_Grid][Tips section]]. (You do not need to setup Ganga in this case.) Note that you can also submit !ARA jobs with pathena. For example, to submit the !UserAnalysis job, I typed <verbatim> pathena AnalysisSkeleton_topOptions.py --inDS fdr08_run2.0052283.physics_Muon.merge.AOD.o3_f8_m10 --outDS user.AsokaDeSilva.`uuidgen` --split 6 </verbatim> -- Main.AsokaDeSilva - 21 Jul 2008
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r19
<
r18
<
r17
<
r16
<
r15
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r19 - 2008-07-26
-
AsokaDeSilva
AtlasCanada
Navigate ATLAS-Canada Wiki:
*
Home
* *
Activities
*
Analysis
Computing
Datasets
Getting Started
Grid Activities
*
Meetings
* *
People in ATLAS Canada
*
User Services
Travel To CERN
Wikis:
ATLAS
ATLAS Physics
Alberta
McGill
Montreal
SFU
Toronto
TRIUMF
UVic
ATLAS-Canada Institute Websites:
ATLAS-Canada
ATLAS Home
Alberta
UBC
Carleton
IPP
McGill
Montreal
SFU
Toronto
TRIUMF
UVic
York
Create New Topic
Search
Copyright © 2008-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback