Skip to content

Debugging DSelector outside of PROOF

Justin Stevens edited this page Aug 19, 2021 · 11 revisions

When executing runSelector.C we utilize PROOF to speed up the processing by using multiple CPU cores in parallel. Unfortunately when there is an error in the code it can be difficult to debug in this mode, since the error could have been on any of the parallel CPU cores. You'll sometimes see errors like the one below when this occurs:

0.<N>: caught exception triggered by signal '1' while processing dset:'TDSet:<channel>_Tree', file:'/sciclone/home10/<user>/tree_channel.root' - check logs for possible stacktrace - last event: 117586

Info in <TProofLite::MarkBad>:

+++ Message from master at vortex.sciclone.wm.edu : marking vortex.sciclone.wm.edu:-1 (0.1) as bad

+++ Reason: undefined message in TProof::CollectInputFrom(...)

+++ Message from master at vortex.sciclone.wm.edu : marking vortex.sciclone.wm.edu:-1 (0.1) as bad

+++ Reason: undefined message in TProof::CollectInputFrom(...)

+++ Most likely your code crashed

+++ Please check the session logs for error messages either using

+++ the 'Show logs' button or executing

+++

+++ root [] TProof::Mgr("vortex.sciclone.wm.edu")->GetSessionLogs()->Display("*")

There are logs for each of the individual cores in the directory ~/.proof/, at a path something like:

~/.proof/wm_gluex-analysis-<channel>-selector/session-<server name>-<lots of random numbers>/worker-0.<N>.log

where you can sometimes find enough information to debug the error in your DSelector_*.C file.

However it can sometimes be easier to debug using just a single CPU core, which you can do by running over a single ROOT TTree without PROOF using the following commands:

[vortex] root.exe -l tree_<channel>.root

Attaching file tree_<channel>.root as _file0...

root [1] gROOT->ProcessLine(".x $(ROOT_ANALYSIS_HOME)/scripts/Load_DSelector.C")

root [2] <channel>_Tree->Process("DSelector_<channel>.C")

Now the errors should be displayed directly on your screen and hopefully provide a hint as to where the coding error occurred.