Simple example of job reading from FAX

Set up ROOT environment

For this example, we're going to use ROOT in a manner similar to a typical ATLAS job. We start with assumption that you have a valid grid proxy. The first thing to do is set up our working environment by executing the following script setup.sh:

~/example > source setup.sh
Setting up gcc
Setting up ROOT
Setting up xRootD

Next we test that root works:

~> root -l
*** DISPLAY not set, setting it to 10.150.25.138:0.0
root [0] .q

Next we download source code read.C, readCopy.C and a simple Makefile.

We compile it:

~/example >make
g++ -O2 -Wall -fPIC -pthread -m64 -I/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.07-x86_64-slc5-gcc4.3/include   -c -o read.o read.C
g++ -O2 -m64 read.o -L/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.07-x86_64-slc5-gcc4.3/lib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -pthread -lm -ldl -rdynamic  -lTreePlayer -o readDirect
readDirect done
g++ -O2 -Wall -fPIC -pthread -m64 -I/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.07-x86_64-slc5-gcc4.3/include   -c -o readCopy.o readCopy.C
g++ -O2 -m64 readCopy.o -L/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.07-x86_64-slc5-gcc4.3/lib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -pthread -lm -ldl -rdynamic  -lTreePlayer -o readCopy
readCopy done

running the program without input arguments gives explanation of command line parameters:

~/example >./readDirect
usage: read <filename> <treename> <percentage of events to read> <TTreeCache size> [file containing branches to be read]

This is output of command which reads 10% of events from a main TTree of the SMWZ ntuple:

./readDirect root://fax.mwt2.org:1094//atlas/dq2/user/flegger/MWT2/user.flegger.MWT2.data12_8TeV.00212172.physics_Muons.merge.NTUP_SMWZ.f479_m1228_p1067_p1141_tid01007411_00/NTUP_SMWZ.01007411._000113.MWT2.root.1 physics 10 30

ROOTVERSION=49362
ROOTBRANCH='tags/v5-34-07'
xrootd - no disk accesses available.
FILESYSTEM='root'
Warning in <TClass::TClass>: no dictionary for class pair<string,string> is available

******TreeCache statistics for tree: physics in file: root://fax.mwt2.org//atlas/dq2/user/flegger/MWT2/user.flegger.MWT2.data12_8TeV.00212172.physics_Muons.merge.NTUP_SMWZ.f479_m1228_p1067_p1141_tid01007411_00/NTUP_SMWZ.01007411._000113.MWT2.root.1 ******
Number of branches in the cache ...: 8543
Cache Efficiency ..................: 0.999150
Cache Efficiency Rel...............: 1.000000
Learn entries......................: 100
Cached Reading.....................: 3387717604 bytes in 62 transactions
Reading............................: 0 bytes in 0 uncached transactions
Readahead..........................: 256000 bytes with overhead = 0 bytes
Average transaction................: 54640.606516 Kbytes
Number of blocks in current cache..: 10281, total size: 53097902
TreeCache = 31 MBytes
N leaves  = 8543
ReadTotal = 3393.21 MBytes
ReadUnZip = 9852.78 MBytes
ReadCalls = 66
ReadSize  = 51412.207 KBytes/read
Readahead = 256 KBytes
Readextra =  0.00 per cent
Real Time = 120.071 seconds
CPU  Time =  70.030 seconds
Disk Time =  56.824 seconds
Disk IO   =  59.714 MBytes/s
ReadUZRT  =  82.058 MBytes/s
ReadUZCP  = 140.694 MBytes/s
ReadRT    =  28.260 MBytes/s
ReadCP    =  48.454 MBytes/s
TOTALSIZE=9836980205
ZIPSIZE=3387765338
FILENAME='root://fax.mwt2.org:1094//atlas/dq2/user/flegger/MWT2/user.flegger.MWT2.data12_8TeV.00212172.physics_Muons.merge.NTUP_SMWZ.f479_m1228_p1067_p1141_tid01007411_00/NTUP_SMWZ.01007411._000113.MWT2.root.1'
EVENTS=38308
WALLTIME=120.064
CPUTIME=70.03
CACHESIZE=3.14573e+07
Read from tree: 8.82292e+08
ROOTBYTESREAD=3393205644
ROOTREADS=66
VMEM=550940
RSS=310896
CPUSTATUS=0.21

ETHERNETIN=2372570
ETHERNETOUT=216338

The second program compiled - readCopy does the same read as the readDirect but also saves the data read in into a new file.

If you would like to stress the system a bit here are list of SMWZ ntuple files at MWT2.list, AGLT2.list, BNL.list, and CERN.list.


Major updates:
-- IlijaVukotic - 04-Jun-2013

Responsible: Main.unknown
Last reviewed by: Never reviewed

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatlist AGLT2.list r1 manage 27.9 K 2013-06-04 - 02:03 UnknownUser Lists of files at a FAX site.
Unknown file formatlist BNL.list r1 manage 30.6 K 2013-06-04 - 02:03 UnknownUser Lists of files at a FAX site.
Unknown file formatlist CERN.list r1 manage 30.7 K 2013-06-04 - 02:03 UnknownUser Lists of files at a FAX site.
Unknown file formatlist MWT2.list r1 manage 27.0 K 2013-06-04 - 02:03 UnknownUser Lists of files at a FAX site.
Unknown file formatext Makefile r2 r1 manage 1.0 K 2013-06-05 - 00:26 UnknownUser  
C source code filec read.C r1 manage 6.8 K 2013-06-04 - 01:27 UnknownUser all the files needed to run this example
C source code filec readCopy.C r1 manage 7.0 K 2013-06-05 - 00:26 UnknownUser  
Unix shell scriptsh setup.sh r1 manage 0.6 K 2013-06-04 - 01:27 UnknownUser all the files needed to run this example
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r3 - 2014-11-20 - TWikiAdminUser
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Atlas 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