Open urbach opened 12 years ago
I've started cataloguing the different outputs by debug level here. The list is not complete but I add a few items now and then. Last file processed was start.c
I would begin by defining
0 debug level which allows output only once (reading configuration file for instance)
1 to 9 debug levels which allow output with increasing frequency based on loop depth perhaps (such as >3 currently means heatbath, acceptance function calls) where > 9 must mean ALL possible text output is also printed
This can be made more granular by defining topical ranges within the interval. (although I don"t know which topics this would be at this point)
Further, I would introduce a second debug variable "g_debug_topic" for the following purpose: Rather than debugging levels, we have an enum of topic specific debug conditions which must be documented separately. With an adjustment in the if conditions, for instance in the smearing routines, we could then have:
if( g_debug_level > 3 || g_debug_topic == DEBUG_SMEARING ) { [...] }
to output only information related to smearing by setting debug_level to 0 or 1. The usefulness of this can of course be debated because as long as the debug output is weil designed, grep will make the above possible without extra logic and without an extra global variable. Also, having the context can come in useful sometimes.
As part of these definitions it might make sense to also remove the "verbose" variable which is set in invert and hmc_tm because having it in place just adds more complexity.
currently we do have the DebugLevel option, what it was never written down which type of message we want to have at which deubg level. Siebren, you thought about it already, didn't you? So maybe we can have sort of a list defining this, but right now I don't have a very good idea, how...!