tem_debug_module Module

Provide a general debug environment. See tem_load_debug for configuration options.


Uses

  • module~~tem_debug_module~~UsesGraph module~tem_debug_module tem_debug_module aot_table_module aot_table_module module~tem_debug_module->aot_table_module flu_binding flu_binding module~tem_debug_module->flu_binding module~env_module env_module module~tem_debug_module->module~env_module module~tem_logging_module tem_logging_module module~tem_debug_module->module~tem_logging_module module~tem_tools_module tem_tools_module module~tem_debug_module->module~tem_tools_module module~env_module->flu_binding aotus_module aotus_module module~env_module->aotus_module iso_fortran_env iso_fortran_env module~env_module->iso_fortran_env mpi mpi module~env_module->mpi module~tem_logging_module->aot_table_module module~tem_logging_module->module~env_module module~tem_logging_module->aotus_module module~tem_tools_module->module~env_module

Used by

  • module~~tem_debug_module~~UsedByGraph module~tem_debug_module tem_debug_module module~tem_bc_prop_module tem_bc_prop_module module~tem_bc_prop_module->module~tem_debug_module module~tem_canonicalnd_module tem_canonicalND_module module~tem_canonicalnd_module->module~tem_debug_module module~tem_construction_module tem_construction_module module~tem_construction_module->module~tem_debug_module module~tem_geometry_module tem_geometry_module module~tem_geometry_module->module~tem_debug_module module~tem_matrix_module tem_matrix_module module~tem_matrix_module->module~tem_debug_module module~tem_restart_module tem_restart_module module~tem_restart_module->module~tem_debug_module module~tem_shape_module tem_shape_module module~tem_shape_module->module~tem_debug_module module~tem_subtree_module tem_subTree_module module~tem_subtree_module->module~tem_debug_module module~tem_tracking_module tem_tracking_module module~tem_tracking_module->module~tem_debug_module

Variables

Type Visibility Attributes Name Initial
integer, public :: dbgUnit(0:tem_last_lu)
type(tem_debug_type), public :: main_debug
integer, private, parameter :: buffer_length = 128

The length of the buffer to create a string representation of arrays.


Interfaces

public interface tem_debug

  • private subroutine tem_debug_for(me, level, msg)

    Write a message to a dedicated debug logger.

    Arguments

    Type IntentOptional Attributes Name
    type(tem_debug_type), intent(in) :: me

    Debug type including the logger to use.

    integer, intent(in) :: level

    Log-Level of this message.

    character(len=*), intent(in) :: msg

    Message to write.

  • private subroutine tem_debug_main(level, msg)

    Write a message to the main debug logger.

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: level

    Log-Level of this message.

    character(len=*), intent(in) :: msg

    Message to write.


Derived Types

type, public ::  tem_debug_type

Debug option definitions

Components

Type Visibility Attributes Name Initial
logical, public :: active = .false.

debug mode activated?

logical, public :: debugFiles = .false.

open separate file for each process

character(len=PathLen), public :: debugMesh

folder to store the debug mesh

integer, public :: unit = -1

unit to write in

logical, public :: checkEachAlgorithmicStep = .false.

output debug output after each step in compute

logical, public :: dumpLevelwiseState = .false.

write element state information to the debugFiles

logical, public :: dumpHaloState = .false.

write halo state information to the debugFiles

logical, public :: dumpTreeIDlists = .false.

write all the required and generated treeIDs in a level-wise manner to the debug file this includes fluid, ghost and halo elements and can serve as a detailed debug output

logical, public :: dumpPropBits = .false.

write all the property bits to disk for all elements

logical, public :: dumpDependencies = .false.

write all dependencies of ghost elements to disk

logical, public :: debugDependencies = .false.

write all dependencies of ghost elements to disk

logical, public :: checkDependencies = .false.

check if the dependencies are correct by cross checking

logical, public :: dumpAuxLists = .false.

write auxiliary lists to disk such as boundary element lists

logical, public :: unitTests = .false.
logical, public :: dumpSource = .false.

write out source debug statements to debug unit

logical, public :: debugRestart = .false.

write out restart debug info

logical, public :: traceMemory = .false.

trace memory consumption

logical, public :: checkNaNs = .false.

Check the state array for NaNs

logical, public :: dumpBoundaries = .false.

Dump boundary elements information

type(tem_logging_type), public :: logger

A logger to describe the output capabilities of this debug object.


Subroutines

public subroutine tem_load_debug(me, conf, rank)

Read the debug configuration into the debug type 'me' The debug definition is placed in the main level of the musubi.lua file It can look like

Read more…

Arguments

Type IntentOptional Attributes Name
type(tem_debug_type) :: me

debug type to store information

type(flu_State) :: conf

lua state

integer, intent(in) :: rank

Rank of the calling process

public subroutine tem_debug_load_main(conf, rank)

Load the main debugger object

Arguments

Type IntentOptional Attributes Name
type(flu_State) :: conf

Lua state, to get the configuration from.

integer, intent(in), optional :: rank

Rank of the calling process.

public subroutine tem_reportStatus(level, text, debug, string)

print an array to the debugunit

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: level

level for debug output

character(len=*) :: text

Array title in debug output for easy identification in the file

type(tem_debug_type), intent(in), optional :: debug

optional debug type

character(len=*), optional :: string

optional additional string extending the title

public subroutine tem_print_array(me, nVals, itemLength, title, outUnit)

print an array to the debugunit

Arguments

Type IntentOptional Attributes Name
integer(kind=long_k), intent(in) :: me(:)

long array to write to debug file

integer, intent(in) :: nVals

number of values in array me

integer, optional :: itemLength

how many characters needs each item of the array to output

character(len=*), optional :: title

Array title in debug output for easy identification in the file

integer, intent(in) :: outUnit

output unit

private subroutine tem_debug_for(me, level, msg)

Write a message to a dedicated debug logger.

Arguments

Type IntentOptional Attributes Name
type(tem_debug_type), intent(in) :: me

Debug type including the logger to use.

integer, intent(in) :: level

Log-Level of this message.

character(len=*), intent(in) :: msg

Message to write.

private subroutine tem_debug_main(level, msg)

Write a message to the main debug logger.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: level

Log-Level of this message.

character(len=*), intent(in) :: msg

Message to write.