ROOT vs PAW

22
1 ROOT vs PAW Davide Grandi INFN Milano

description

ROOT vs PAW. Davide Grandi INFN Milano. Summary. Davide Grandi INFN Milano. ROOT and NT file size (different compressions and split) ROOT and PAW I/O performance (selection functions for analysis and compiled codes) PAW and ROOT functionality (C++ knowledge, GUI etc.). - PowerPoint PPT Presentation

Transcript of ROOT vs PAW

1

ROOT vs PAW

Davide GrandiINFN Milano

2

Summary

AMS Computing Meeting june 10th 2002

Davide Grandi INFN Milano

ROOT and NT file size (different compressions and split)ROOT and PAW I/O performance (selection functions for analysis and compiled codes)PAW and ROOT functionality (C++ knowledge, GUI etc.)

3

Hardware & Software

AMS Computing Meeting june 10th 2002

Davide Grandi INFN Milano

MACHINE: pcamsf2 OS: RH Linux 7.2 RAM 1 GB“local” DISK RAID5

ROOT version: 3.03/04 19 April 2002 PAW version: 2.12/22 13 June 2001

4

ROOT and NT file size (10k ev)

AMS Computing Meeting june 10th 2002

Davide Grandi INFN Milano

mode MB

NT 122.6

NT gzipped 46.7

NT h2root 53.4

Root indices Split = 1 Comp = 2 56.1

Root pointers Split = 1 Comp = 2 62.7.1

Root Split = 2 Comp = 2 54.3

5

I/O performance

AMS Computing Meeting june 10th 2002

Davide Grandi INFN Milano

PAW features: UWFUNCCode automatically compiled by PAW Chain of ntuplesGzipping ntuples to compare with Root space occupancy

ROOT features: MakeSelector (create a *.C and *.h)TChainACLiC to compile, create shared lib and linkTClonesArray

6

PAW & ROOT Chains

AMS Computing Meeting june 10th 2002

Davide Grandi INFN Milano

PAW: ntuples (6 of approx 120 MB) used for first test of PAW speedNtuples gunzipped to compare with ROOT speedPAW tests with/without gunzipping ntuples

ROOT: Trees “written” with normla compression level (1) and maximum (9) 6 trees loaded with TChainMakeSelector code executed with ACLiC calls (automatic creation of a shared lib, link and compilation from ROOT)

7

few

word

s on

R

OO

T (

1)

A

MS

Com

pu

tin

g M

eeti

ng

ju

ne 1

0th

2002

David

e G

ran

di IN

FN

M

ilan

o

8

few words on ROOT (2)

AMS Computing Meeting june 10th 2002

Davide Grandi INFN Milano

Compression: gzip algorithmBranches (independent variables: object, list, folder, array)Leaves (variables in a branch)Split level

default is 99 (object split to the maximum)N.B. Level 1 TClonesArray not splittedMore split: fast to read slow to write

Collections (object, pointers to cast)

9

Variables selection

AMS Computing Meeting june 10th 2002

Davide Grandi INFN Milano

PAW has a nice feature of reading only variables required by the code (optimized for end users)Selection function from V. Choutko (fortran function)

ROOT hasn’t the automatical feature of redaing only variables requird by the code Selection fortran function transformed to C/C++ style (not so easy…)

10

PAW & ROOT speed (1)

AMS Computing Meeting june 10th 2002

Davide Grandi INFN Milano

files Analysis time (U S E CPU%)

NT gunzipped 22.710 8.330 2:28.55 20.8%

Root comp=1 Creating sh lib 67.260 4.950 2:50.14 42.4%

Root comp=1 Sh lib created 56.170 3.970 2:32.19 39.5%

All ROOT tree branches (400) read when function requires only 40-50

11

PAW & ROOT speed (2)

AMS Computing Meeting june 10th 2002

Davide Grandi INFN Milano

files Analysis time (U S E CPU%)

NT no gunzip 9.460 2.300 0:45.08 26.0%

Root comp=1 Creating sh lib 16.770 1.250 0:17.90 100.6%

Root comp=1 Creating sh lib 5.270 0.350 0:05.63 99.8%

Root comp=9 Creating sh lib 16.540 1.220 0:17.70 100.3%

Root comp=9 Sh lib created 5.210 0.290 0:05.51 99.8%

Only required branches (40-50) read, but carefully in creation order (*.h file) !!!!

12

Clone sArray

AMS Computing Meeting june 10th 2002

Davide Grandi INFN Milano

New production (from A. Klimentov) with TClonesArray (manage objects of the same class, constant size of element, reuses memory), compression level 2 and 2 different split levels (1 and 2)Selection function always from V. ChoutkoFor split level 1: all tree was loaded For split level 2: only needeb branches are readed (similar to h2root converted file…)N.B. probably optimization is possible…

13

Clone sArray (1K events)

AMS Computing Meeting june 10th 2002

Davide Grandi INFN Milano

files Analysis time (U S E CPU%)

NT gunzipped 0.740 0.280 0:01.28 79.6%

NT 0.420 0.150 0:00.85 67.0%

Root split 1 Creating sh lib 5.480 1.550 0:08.39 83.7%

Root split 1 Sh lib created 1.280 0.130 0:01.50 94.0%

Root split 2 Creating sh lib 18.890 2.100 0:23.13 90.7%

Root split 2 Sh lib created 0.510 0.140 0:00.89 79.6%

14

Clone sArray (10K events)

AMS Computing Meeting june 10th 2002

Davide Grandi INFN Milano

files Analysis time (U S E CPU%)

NT gunzipped 4.460 1.930 0:18.48 34.5%

NT 1.860 0.840 0:07.21 37.4%

Root split 1 Creating sh lib 15.540 2.390 0:25.62 69.9%

Root split 1 Sh lib created 10.850 0.950 0:16.39 71.9%

Root split 2 Creating sh lib 20.540 2.580 0:33.31 69.4%

Root split 2 Sh lib created 1.450 0.230 0:02.27 74.0%

15

Clone sArray (30K events)

AMS Computing Meeting june 10th 2002

Davide Grandi INFN Milano

files Analysis time (U S E CPU%)

NT gunzipped 13.500 4.770 0:54.88 33.2%

NT 5.890 1.030 0:16.99 40.7%

Root split 1 Creating sh lib 36.040 5.490 0:56.69 73.2%

Root split 1 Sh lib created 31.720 2.330 0:40.48 84.1%

Root split 2 Creating sh lib 81.050 5.960 1:36.94 89.7%

Root split 2 Sh lib created 62.740 3.070 1:08.48 96.1%

16

PAW and ROOT functionality

AMS Computing Meeting june 10th 2002

Davide Grandi INFN Milano

CPU: PAW is almost always below 50% Well known analysis toolEasy to write a fortran code for ntuple analysis

CPU: Root seems to optimize load (nearly 100% the machine is almost blocked!) Many features not yet exploredEasy to produce .ps or .gif files

17

ROOT GUI & other features

AMS Computing Meeting june 10th 2002

Davide Grandi INFN Milano

Graphics in ROOT is greately improved: you can select with mouseTBrowser (window and folders)CINT support C/C++ (better than only C++)Fit is simpleInsert Text & Latex math expression3D histograms rotated with the mouse……. sometimes not stable!

18

ROOT GUI(2)

AMS Computing Meeting june 10th 2002

Davide Grandi INFN Milano

19

ROOT GUI(3)

AMS Computing Meeting june 10th 2002

Davide Grandi INFN Milano

20

C++ knowledge

AMS Computing Meeting june 10th 2002

Davide Grandi INFN Milano

For h2root converted: fortran users don’t need big experience in C++ for normal selectionsFor CloneArrays C++ needed is more complicated (MakeSelector doesn’t recognize ClonesArray…. So they have been loaded by hand)

Root Macros: easy to realize when skeleton produced by root features as MakeSelector or MakeClassA bit harder if made by hand (>400 branches/variables)

21

Preliminary conclusions

AMS Computing Meeting june 10th 2002

Davide Grandi INFN Milano

h2root:PAW is faster compared with root selections because of recognizing required variablesHand made modification of ROOT macro gives ROOT faster than PAW (2 times)

ClonesArray:PAW is faster than ROOT (comparable speed: more tests are needed) Split level 1 seems better (need to study optimization as reading only branches required)

22

Aknowledgements

AMS Computing Meeting june 10th 2002

Davide Grandi INFN Milano

I’d like to thank for the support and for important suggestions and programming “lessons”:Alexei KlimentovVitaly Choutko of CERN AMS staffMatteo BoschiniMikhail Levtchenko of Milano AMS staff