Difference between revisions of "Debugging DUNE far detector SW"
DavidAdams (talk | contribs) (→FCL) |
EileenBerman (talk | contribs) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | ---- | ||
+ | ---- | ||
+ | ---- | ||
+ | ---- | ||
+ | ==<span style="background:yellow">This page has moved to the [https://wiki.dunescience.org/wiki/Debugging_DUNE_far_detector_SW DUNE wiki]</span>== | ||
+ | ---- | ||
+ | ---- | ||
+ | ---- | ||
+ | ---- | ||
+ | |||
== Crashes == | == Crashes == | ||
LArSoft will sometimes crash with a stack trace but other times simply exit prematurely without any error message. | LArSoft will sometimes crash with a stack trace but other times simply exit prematurely without any error message. |
Latest revision as of 20:11, 8 December 2017
This page has moved to the DUNE wiki
Crashes
LArSoft will sometimes crash with a stack trace but other times simply exit prematurely without any error message. In the latter case, it may help to run in a debugger (e.g. gdb) and then print the stack trace when the program terminates. In gdb, the command "bt" will show the trace.
gdb
To run with gdb, I replace the command "lar $ARGS" with "gdb --args lar $ARGS" followed by the gdb command "r". One can also attach to an existing process with "gdb -a PID".
To stop execution when an exception is raised, use the gdb command "catch throw".
totalview
At FNAL, one can debug with totalview.
FCL
LArsSoft can have a rather complicated nest of FCL files to set parameter values. To see the final value assignments, export the variable ART_DEBUG_CONFIG=1 before running. This will invoke an art program that displays the fcl values including the file where each was defined.
Note that art appends the field service_type to each service description.
Or use fcldump from art_extensions. It does not append anything and has nicer formatting (but does not show the file for every variable).