debugging
moment_kinetics.debugging
— ModuleDefine debugging levels that can be used to include extra debugging steps
Provides a bunch of macros (see the macronames
Vector) that can be used to surround code in other modules so that it only runs if the 'debug level' passed to the --debug
or -d
command line argument is high enough.
Also provides macro *_ifelse
whose names are taken from macronames
, which can be used to switch definitions, etc. For example, if debug_shared_array
is in macronames
, then
const MPISharedArray = @debug_shared_array_ifelse(DebugMPISharedArray, Array)
can be used to make the type represented by MPISharedArray
depend on the debug level.
moment_kinetics.debugging._debug_level
— Constantmoment_kinetics.debugging.macronames
— Constantmoment_kinetics.debugging.@debug_block_synchronize
— MacroCheck blocksynchronize() was called from the same place on every process. Activated at _debug_level >= 4
Currently inactive (_debug_level = 0
).
moment_kinetics.debugging.@debug_block_synchronize_ifelse
— MacroEvaluate first expression if debugblocksynchronize is active, second expression if not debugblocksynchronize is inactive (_debug_level = 0 < 4
).
moment_kinetics.debugging.@debug_detect_redundant_block_synchronize
— MacroCheck if any blocksynchronize() call could have been skipped without resulting in an error. Activated at _debug_level >= 5
Currently inactive (_debug_level = 0
).
moment_kinetics.debugging.@debug_detect_redundant_block_synchronize_ifelse
— MacroEvaluate first expression if debugdetectredundantblocksynchronize is active, second expression if not debugdetectredundantblocksynchronize is inactive (_debug_level = 0 < 5
).
moment_kinetics.debugging.@debug_initialize_NaN
— MacroInitialize arrays with NaN. Activated at _debug_level >= 1
Currently inactive (_debug_level = 0
).
moment_kinetics.debugging.@debug_initialize_NaN_ifelse
— MacroEvaluate first expression if debuginitializeNaN is active, second expression if not debuginitializeNaN is inactive (_debug_level = 0 < 1
).
moment_kinetics.debugging.@debug_shared_array
— MacroCheck for incorrect reads/writes to shared-memory arrays Activated at _debug_level >= 2
Currently inactive (_debug_level = 0
).
moment_kinetics.debugging.@debug_shared_array_allocate
— MacroCheck that allocateshared() was called from the same place on every process. Activated at `debuglevel >= 4Currently inactive (
debug_level = 0`).
moment_kinetics.debugging.@debug_shared_array_allocate_ifelse
— MacroEvaluate first expression if debugsharedarrayallocate is active, second expression if not debugsharedarrayallocate is inactive (_debug_level = 0 < 4
).
moment_kinetics.debugging.@debug_shared_array_ifelse
— MacroEvaluate first expression if debugsharedarray is active, second expression if not debugsharedarray is inactive (_debug_level = 0 < 2
).
moment_kinetics.debugging.@debug_track_array_allocate_location
— MacroRecord where every array was allocated. Activated at _debug_level >= 3
Currently inactive (_debug_level = 0
).
moment_kinetics.debugging.@debug_track_array_allocate_location_ifelse
— MacroEvaluate first expression if debugtrackarrayallocatelocation is active, second expression if not debugtrackarrayallocatelocation is inactive (_debug_level = 0 < 3
).
moment_kinetics.debugging.@debug_track_initialized
— MacroCheck that every array is initialized before being used. Activated at _debug_level >= 3
Currently inactive (_debug_level = 0
).
moment_kinetics.debugging.@debug_track_initialized_ifelse
— MacroEvaluate first expression if debugtrackinitialized is active, second expression if not debugtrackinitialized is inactive (_debug_level = 0 < 3
).