Prevent PROOF from splitting files

Hi Experts

I am trying to improve performance of event reading by skipping some events. For this purpose I am creating an index file “per root file” which says which events are good for analysis. In the second run, the other events are skipped and this improves the performance. This works very well on 1 core.

Unfortunately, running with PROOFLite on multiple cores sometimes splits the files in packets of events and passes them to the multiple cores for processing. Then my scheme with the index files gets screwed up (multiple threads writing to the same resource => concurrency fun :slight_smile: )

Is there a way to tell PROOF not to split files, but only analyze full files per instance?
Or is there an infrastructure in PROOF which can accomplish the same thing?

P.S. I realize that what I am doing does not fit into the idea of PROOF. But right now I need to be pragmatic :slight_smile:

Thank you very much in advance for help.

ctopfel

Hi,

If I am guessing right, ROOT’s implementation of your index file is the TEntryList object. You can create one of those list to select a subset of the entry of a TTree or TChain and TTree::Draw and Proof will know to only use those entries.

Philippe.

Hi Philippe

Can you give me an example of how I would accomplish this assuming that I have a list of entry numbers which I want PROOF to process?

I didn’t manage to selectively run on these entries (with what I tried, I either run all or none).

Thanks in advance.

ctopfel

Hi,

The tutorial proof/runtProof.C has an example on how to use a TEntryList. The tutorial tree/h1analysis.C has and example of creation and use of a TEntryList object.

Cheers,
Philippe.

PS. What did you try?

Hi Philippe

In the meantime, I got a few steps further (Initially, I was tinkering inside the TSelector), which is a bad idea probably)

Now I have another problem with a segmentation fault: (obviously in the TProof::Process method)

#5 0x000000000ceb9a60 in ?? ()
#6 0x00002b50946d9e5f in TProof::Process ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libProof.so
#7 0x00002b5094752b3e in G__G__Proof_137_0_124 ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libProof.so

I am working with Datasets in Proof, so I have to use the TProof::Process method like this:

p->Process( dsname , “D3PDSelector.C+”, “”, -1, 0, tel);

“tel” is a TEntryList Object, with the following content (Print(“all”)):

susy file:///terabig/ctopfel/PROOF/D3PDAnalysis/DataSetSymLinkRepository/user10.GeorgeRedlinger.SUSYD3PD.mc09_7TeV.106400.SU4_jimmy_susy.merge.AOD.e496_s765_s767_r1250_r1260.100505.1/user10.GeorgeRedlinger.SUSYD3PD.mc09_7TeV.106400.SU4_jimmy_susy.merge.AOD.e496_s765_s767_r1250_r1260.100505.1.D3PD._00003.root
12
16
22
… (and so on, 3 files with many entries)

creating this file according to the example in the tutorial went fine, but using it as List for PROOF seems to crash PROOF:

Full crash backtrace:

Looking up for exact location of files: OK (3 files)
Looking up for exact location of files: OK (3 files)
Info in TPacketizerAdaptive::TPacketizerAdaptive: Setting max number of workers per node to 8
Validating files: OK (3 files)
Info in TPacketizerAdaptive::TPacketizerAdaptive: no valid or non-empty file found: setting invalid
Error in TProofPlayerLite::InitPacketizer: instantiated packetizer object ‘TPacketizerAdaptive’ is invalid
Error in TProofPlayerLite::Process: cannot init the packetizer
Info in TProofLite::UpdateDialog: processing was aborted - 0 events processed

*** Break *** segmentation violation

===========================================================
There was a crash.
This is the entire stack trace of all threads:

#0 0x000000334e699c85 in waitpid () from /lib64/libc.so.6
#1 0x000000334e63c331 in do_system () from /lib64/libc.so.6
#2 0x00002b5092265c66 in TUnixSystem::StackTrace ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libCore.so
#3 0x00002b509226251a in TUnixSystem::DispatchSignals ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libCore.so
#4
#5 0x000000000ceb9a60 in ?? ()
#6 0x00002b50946d9e5f in TProof::Process ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libProof.so
#7 0x00002b5094752b3e in G__G__Proof_137_0_124 ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libProof.so
#8 0x00002b50929576c3 in Cint::G__ExceptionWrapper ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libCint.so
#9 0x00002b5092a04f10 in G__execute_call ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libCint.so
#10 0x00002b5092a05252 in G__call_cppfunc ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libCint.so
#11 0x00002b50929e5735 in G__interpret_func ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libCint.so
#12 0x00002b50929d2571 in G__getfunction ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libCint.so
#13 0x00002b5092ac47b9 in G__getstructmem ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libCint.so
#14 0x00002b5092abb2b4 in G__getvariable ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libCint.so
#15 0x00002b50929a5cd1 in G__getitem ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libCint.so
#16 0x00002b50929a791e in G__getexpr ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libCint.so
#17 0x00002b5092a41acc in G__exec_statement ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libCint.so
#18 0x00002b5092a3fc9a in G__exec_statement ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libCint.so
#19 0x00002b5092a3f799 in G__exec_statement ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libCint.so
#20 0x00002b5092a43257 in G__exec_loop ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libCint.so
#21 0x00002b5092a41108 in G__exec_statement ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libCint.so
#22 0x00002b5092a3fc9a in G__exec_statement ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libCint.so
#23 0x00002b5092992854 in G__exec_tempfile_core ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libCint.so
#24 0x00002b5092993d8b in G__exec_tempfile ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libCint.so
#25 0x00002b5092a4d0ce in G__process_cmd ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libCint.so
#26 0x00002b509224ab1f in TCint::ProcessLine ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libCore.so
#27 0x00002b509224acf4 in TCint::ProcessLineSynch ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libCore.so
#28 0x00002b509218091f in TApplication::ExecuteFile ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libCore.so
#29 0x00002b509217f0b5 in TApplication::ProcessLine ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libCore.so
#30 0x00002b50934c56c4 in TRint::HandleTermInput ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libRint.so
#31 0x00002b50934c37e7 in TTermInputHandler::Notify ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libRint.so
#32 0x00002b50934c5f1d in TTermInputHandler::ReadNotify ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libRint.so
#33 0x00002b509225e9b3 in TUnixSystem::CheckDescriptors ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libCore.so
#34 0x00002b5092262b49 in TUnixSystem::DispatchOneEvent ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libCore.so
#35 0x00002b50921dc5c5 in TSystem::InnerLoop ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libCore.so
#36 0x00002b50921dc37a in TSystem::Run ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libCore.so
#37 0x00002b509217f2ff in TApplication::Run ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libCore.so
#38 0x00002b50934c4071 in TRint::Run ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libRint.so
#39 0x000000000040107d in main ()

The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug report at
root.cern.ch/bugs. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.

#5 0x000000000ceb9a60 in ?? ()
#6 0x00002b50946d9e5f in TProof::Process ()
from /terabig/ctopfel/root/newroor5_26_64/lib/libProof.so

Hi,

Can you run the same example in valgrind? Can you check (you might need a debug version of ROOT) on which line of TProof::Process its crashes?

Thanks,
Philippe.

Is there a tutorial on how I can run with valgrind?

And how can I install (compile) a debug version of root?

Thank you for the help!

[quote]Is there a tutorial on how I can run with valgrind? [/quote]To run valgrind on root itself use:valgrind root.exeTo run valgrind on the Proof slave see root.cern.ch/drupal/content/runn … y-valgrind

[quote]And how can I install (compile) a debug version of root?[/quote]See the installation instruction: root.cern.ch/drupal/content/inst … oot-source, to insure a debug build either pass --build=debug as an argument to configure or set then environment variable ROOTBUILD=debug

Cheers,
Philippe.