Difference between revisions of "Debugging DUNE far detector SW"

From DUNE
Jump to navigation Jump to search
 
Line 3: Line 3:
 
----
 
----
 
----
 
----
==<span style="background:yellow">This page has moved to the [https://wiki.dunescience.org/wiki DUNE wiki]</span>==
+
==<span style="background:yellow">This page has moved to the [https://wiki.dunescience.org/wiki/Debugging_DUNE_far_detector_SW DUNE wiki]</span>==
 
----
 
----
 
----
 
----

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).