fordebug Module


Uses

  • module~~fordebug~~UsesGraph module~fordebug fordebug fortime fortime module~fordebug->fortime iso_fortran_env iso_fortran_env module~fordebug->iso_fortran_env

Used by

  • module~~fordebug~~UsedByGraph module~fordebug fordebug module~fordebug_smod fordebug_smod module~fordebug_smod->module~fordebug module~my_module my_module module~my_module->module~fordebug proc~pure_subroutine pure_subroutine proc~pure_subroutine->module~fordebug proc~pure_subroutine~2 pure_subroutine proc~pure_subroutine~2->module~fordebug program~simple simple program~simple->module~fordebug program~complex complex program~complex->module~my_module

Variables

Type Visibility Attributes Name Initial
logical, private, parameter :: DEBUG_MODE = .false.
integer, private, parameter :: ERROR = 1
integer, private, parameter :: INFO = 3
integer, private, parameter :: MAX_LENGTH_CATEGORY = 32
integer, private, parameter :: MAX_LENGTH_LOCATION = 128
integer, private, parameter :: MAX_LENGTH_MESSAGE = 128
integer, private, parameter :: MAX_LENGTH_SUGGESTION = 128
integer, private, parameter :: NONE = 0
integer, private, parameter :: WARNING = 2

Interfaces

interface

  • public pure module subroutine ptimer_start(t)

    Arguments

    Type IntentOptional Attributes Name
    type(timer), intent(inout) :: t

interface

  • public pure module subroutine ptimer_stop(t, message)

    Arguments

    Type IntentOptional Attributes Name
    type(timer), intent(inout) :: t
    character(len=*), intent(in), optional :: message

interface

  • public pure module subroutine pwrite(message, format, file, R0i32, R0r32, R0c32, R0i64, R0r64, R0c64, R0ch, R1i32, R1r32, R1c32, R1i64, R1r64, R1c64, R2i32, R2r32, R2c32, R2i64, R2r64, R2c64, access)

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in), optional :: message

    Message to print

    character(len=*), intent(in), optional :: format

    Format to use for printing

    character(len=*), intent(in), optional :: file

    File to write to

    integer(kind=int32), intent(in), optional :: R0i32

    Rank=0, integer, kind=int32

    real(kind=real32), intent(in), optional :: R0r32

    Rank=0, real , kind=real32

    complex(kind=real32), intent(in), optional :: R0c32

    Rank=0, complex, kind=real32

    integer(kind=int64), intent(in), optional :: R0i64

    Rank=0, integer, kind=int64

    real(kind=real64), intent(in), optional :: R0r64

    Rank=0, real , kind=real64

    complex(kind=real64), intent(in), optional :: R0c64

    Rank=0, complex, kind=real64

    character(len=*), intent(in), optional :: R0ch

    Rank=0, character

    integer(kind=int32), intent(in), optional :: R1i32(:)

    Rank=1, integer, kind=int32

    real(kind=real32), intent(in), optional :: R1r32(:)

    Rank=1, real , kind=real32

    complex(kind=real32), intent(in), optional :: R1c32(:)

    Rank=1, complex, kind=real32

    integer(kind=int64), intent(in), optional :: R1i64(:)

    Rank=1, integer, kind=int64

    real(kind=real64), intent(in), optional :: R1r64(:)

    Rank=1, real , kind=real64

    complex(kind=real64), intent(in), optional :: R1c64(:)

    Rank=1, complex, kind=real64

    integer(kind=int32), intent(in), optional :: R2i32(:,:)

    Rank=2, integer, kind=int32

    real(kind=real32), intent(in), optional :: R2r32(:,:)

    Rank=2, real , kind=real32

    complex(kind=real32), intent(in), optional :: R2c32(:,:)

    Rank=2, complex, kind=real32

    integer(kind=int64), intent(in), optional :: R2i64(:,:)

    Rank=2, integer, kind=int64

    real(kind=real64), intent(in), optional :: R2r64(:,:)

    Rank=2, real , kind=real64

    complex(kind=real64), intent(in), optional :: R2c64(:,:)

    Rank=2, complex, kind=real64

    character(len=*), intent(in), optional :: access

    Access mode for file


Derived Types

type, public ::  debug

Components

Type Visibility Attributes Name Initial
logical, public :: ok = .true.

.true. means no error/warning/info

character(len=MAX_LENGTH_CATEGORY), private :: category

category of error/warning/info

integer, private :: code = NONE

error/warning/info code, 0=none

logical, private :: dbg = DEBUG_MODE

debug mode flag

character(len=MAX_LENGTH_LOCATION), private :: location

location of error/warning/info

character(len=MAX_LENGTH_MESSAGE), private :: message

message of error/warning/info

integer, private :: severity = NONE

severity of the error, 0=none, 1=error, 2=warning, 3=info

character(len=MAX_LENGTH_SUGGESTION), private :: suggestion

suggestion for error/warning/info

Type-Bound Procedures

procedure, public :: print => print_error
procedure, public :: reset
procedure, public :: set

Functions

public pure function debug_loc(file, line) result(s)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: file
integer, intent(in) :: line

Return Value character(len=256)


Subroutines

private impure subroutine print_error(this)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

Type IntentOptional Attributes Name
class(debug), intent(in) :: this

private pure elemental subroutine reset(this)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

Type IntentOptional Attributes Name
class(debug), intent(inout) :: this

private pure elemental subroutine set(this, severity, code, category, message, location, suggestion)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

Type IntentOptional Attributes Name
class(debug), intent(inout) :: this
integer, intent(in) :: severity
integer, intent(in) :: code
character(len=*), intent(in) :: category
character(len=*), intent(in) :: message
character(len=*), intent(in) :: location
character(len=*), intent(in) :: suggestion