[PROOF] problem with an example

Hi

I generate a random root file with 20 millions of events (using tree1.C) and I try an example I found about PROOF :

without proof, I have :
Real time 0:00:00, CP time 0.000
root [1] TFile *f1 = TFile::Open(“tree1.root”)
Real time 0:00:00, CP time 0.050
root [2] t1->Draw(“px”)
TCanvas::MakeDefCanvas: created default TCanvas with name c1
Real time 0:00:29, CP time 9.640

with proof :
root [0] gROOT->Time();
Real time 0:00:00, CP time 0.010
root [1] TFile f1 = TFile::Open(“tree1.root”)
Real time 0:00:00, CP time 0.040
root [2] gROOT->Proof(“marpain”)
kbernard@marpain.in2p3.fr password:
PROOF set to parallel mode (6 slaves)
(class TVirtualProof
)0x8bed928
Real time 0:00:13, CP time 0.370
root [3] t1->Draw(“px”)
TCanvas::MakeDefCanvas: created default TCanvas with name c1
Real time 0:00:29, CP time 9.690

it takes the same time to do the same job. I think nothing was running on the slaves …

Thanks,

Karim.

Hi Karim,

TTree::Draw does not yet take advantage of PROOF. You still need to use a TSelector (for example use TTree::MakeSelector to get your started).

Cheers,
Philippe.

Well, I have tried to use selector. I generate a myselector.C and myselector.h file from a root file generated by tree1.C (from tutorial) and I have modified those files to fill an histogram.

without PROOF :

root [0] TFile *f1 = TFile::Open(“tree2.root”)
root [1] t1->Process(“myselector.C”)
(Int_t)0
root [2] fHist->Draw()

it works

with PROOF :
root [0] TDSet set;
root [1] set = new TDSet(“TTree”,“t1”);
root [2] set->Add("/atlas/kbernard/ROOT/test/test2/tree3.root");
root [3] gROOT->Proof(“marpain”)
kbernard@marpain.in2p3.fr password:
PROOF set to parallel mode (2 slaves)
(class TVirtualProof
)0x8b20200
root [4] set->Process(“myselector.C”)

the PROOF query progress windows opens and … nothing happens, if I look at the log file of the slave nodes, I can see that it has crashed …

0x4013f554 in TSystem::InnerLoop() + 0x22 from /scatlas4/kbernard/ROOT/lib/root
/libCore.so
0x4013f4f0 in TSystem::Run() + 0x72 from /scatlas4/kbernard/ROOT/lib/root/libCo
re.so
0x400ee340 in TApplication::Run(bool) + 0x30 from /scatlas4/kbernard/ROOT/lib/r
oot/libCore.so
0x40ff6287 in TProofServ::Run(bool) + 0x27 from /scatlas4/kbernard/ROOT/lib/roo
t/libProof.so
0x08048b2d in main + 0x7d from /scatlas4/kbernard/ROOT/bin/proofserv
0x411dd336 in __libc_start_main at /usr/src/build/322157-i386/BUILD/glibc-2.2.4
/csu/…/sysdeps/generic/libc-start.c:129 from /lib/libc.so.6
0x080489c1 in pthread_mutex_unlock + 0x31 from /scatlas4/kbernard/ROOT/bin/proo
fserv
Function Process() busy flag cleared
Function ProcessFill() busy flag cleared

If anyone has an idea (or some example files :slight_smile: )…

Thanks,

Karim.
myselector.C (4.14 KB)
myselector.h (2.87 KB)

Hi,

You did not specify your ROOT version.

Anyway it looks like you need to move the line

in the SlaveBegin and add it to the output list.

Cheers,
Philippe.

Thanks a lot it works better now

20 millions events on 6 computers :

without proof : 5 min 26s
with : 1 min 13s

but I have to find why my histo is empty :slight_smile:

Karim.

Hi,

Remember that the filled out histogram is in the output list (and not in fHist) on the client.

Cheers,
Philippe.

How can I extract fHist from fOutput which is a TList ? (sorry I am not very familiar with ROOT)

Cheers,

Karim.

Hi,

With something like

Cheers,
Philippe.