41  integer, 
parameter, 
public :: MAX_INFO_LEN = 256
 
   51    procedure(event_info_get_info),  
deferred :: get_info
 
   59      class(event_info_t), 
intent(in) :: this
 
   60      character(len=MAX_INFO_LEN)     :: result
 
   70    character(len=MAX_INFO_LEN) :: function_name
 
   71    character(len=ALGO_LABEL_LEN) :: op_label
 
   77    procedure :: event_function_call_constructor
 
   85    character(len=MAX_INFO_LEN) :: name
 
   86    character(len=MAX_INFO_LEN) :: detail
 
   87    class(iteration_counter_t), 
allocatable :: iteration
 
   88    character(len=MAX_INFO_LEN) :: action
 
   94    procedure :: event_iteration_update_constructor
 
  102    character(len=MAX_INFO_LEN) :: text
 
  108    procedure :: event_marker_constructor
 
  116    integer, 
public :: enter_ID
 
  120    procedure :: event_handle_constructor
 
  125  type(mpi_grp_t) :: mpi_grp
 
  133    integer, 
intent(in)                               :: id
 
  145    character(*),                   
intent(in)           :: name
 
  151    event%function_name = name
 
  153    if (
present(op)) 
then 
  154      event%op_label = op%label
 
  156      event%op_label = 
"NULL" 
  165    character(len=MAX_INFO_LEN)  :: 
info 
  169    info = 
"type: function_call | function: " // trim(this%function_name)
 
  170    if (this%op_label /= 
"NULL") 
then 
  171      info = trim(
info) // 
" | operation: " // trim(this%op_label)
 
  180    character(*),               
intent(in) :: name
 
  181    character(*),               
intent(in) :: detail
 
  183    character(len=*),           
intent(in) :: action
 
  188    event%iteration = iteration
 
  190    event%detail = detail
 
  191    event%action = action
 
  199    character(len=MAX_INFO_LEN)  :: 
info 
  203    write(
info, 
'("type: clock_update | clock_name: ",a," | clock_detail: ",a," | clock: ",E15.5," | action: ",a)') &
 
  204      trim(this%name), trim(this%detail), this%iteration%value(), trim(this%action)
 
  212    character(*),  
intent(in)   :: text
 
  225    character(len=MAX_INFO_LEN)  :: 
info 
  229    write(
info, 
'("type: marker | text: ",a)') trim(this%text)
 
  237    character(*),      
intent(in)      :: filename
 
  246    if (
debug%propagation_graph .and. mpi_grp%rank == 0) 
then 
  247      iunit = 
io_open(filename, namespace, action=
"write", status=
"unknown")
 
  257    if (
debug%propagation_graph .and. mpi_grp%rank == 0) 
then 
  267    class(
namespace_t),  
intent(in), 
optional           :: system_namespace
 
  270    character(len = MAX_NAMESPACE_LEN) ::  system_name
 
  274    if (
debug%propagation_graph .and. mpi_grp%rank == 0) 
then 
  276      if (
present(system_namespace)) 
then 
  277        system_name = 
'.'//trim(system_namespace%get())
 
  278        if (system_name == 
'.') system_name = 
'' 
  283      write(iunit, 
'("MARKER:   ",I10," | system: ",a,"| ",a)' , advance=
'yes') event_id, &
 
  284        trim(system_name), trim(event%get_info())
 
  285      event_id = event_id + 1
 
  294    interaction_iteration, partner_iteration, requested_iteration) 
result(handle)
 
  295    class(
namespace_t),  
intent(in), 
optional           :: system_namespace
 
  297    character(*), 
optional                              :: extra
 
  305    character(len = MAX_NAMESPACE_LEN) ::  system_name
 
  309    if (
debug%propagation_graph .and. mpi_grp%rank == 0) 
then 
  311      if (
present(system_namespace)) 
then 
  312        system_name = 
'.'//trim(system_namespace%get())
 
  313        if (system_name == 
'.') system_name = 
'' 
  320      write(iunit, 
'("IN  step: ",I10," | system: ",a,"| ",a)' , advance=
'no') event_id, trim(system_name), trim(event%get_info())
 
  322      if (
present(extra)) 
then 
  323        write(iunit, 
'(" | ",a)' , advance=
'no')  trim(extra)
 
  326      if (
present(system_iteration)) 
then 
  327        write(iunit, 
'(" | system_clock:", E15.5)' , advance=
'no')  system_iteration%value()
 
  330      if (
present(algo_iteration)) 
then 
  331        write(iunit, 
'(" | prop_clock:", E15.5)' , advance=
'no')  algo_iteration%value()
 
  334      if (
present(interaction_iteration)) 
then 
  335        write(iunit, 
'(" | interaction_clock:", E15.5)' , advance=
'no')  interaction_iteration%value()
 
  338      if (
present(partner_iteration)) 
then 
  339        write(iunit, 
'(" | partner_clock:", E15.5)' , advance=
'no')  partner_iteration%value()
 
  342      if (
present(requested_iteration)) 
then 
  343        write(iunit, 
'(" | requested_clock:", E15.5)' , advance=
'no')  requested_iteration%value()
 
  346      write(iunit, 
'()' , advance=
'yes')
 
  348      event_id = event_id + 1
 
  356    interaction_iteration, partner_iteration, requested_iteration)
 
  358    character(*),                           
optional  :: extra
 
  359    logical,                                
optional  :: update
 
  366    character(17)                        :: update_string
 
  370    if (
debug%propagation_graph .and. mpi_grp%rank == 0) 
then 
  372      if (
present(update)) 
then 
  374          update_string = 
" | updated: true" 
  376          update_string = 
" | updated: false" 
  382      write(iunit, 
'("OUT step: ",I10," | closes: ",I10)', advance=
'no')  &
 
  383        event_id, handle%enter_ID
 
  385      if (
present(update)) 
then 
  387          write(iunit, 
'(" | updated: true")', advance=
'no')
 
  389          write(iunit, 
'(" | updated: false")', advance=
'no')
 
  393      if (
present(extra)) 
then 
  394        write(iunit, 
'(" | ",a)' , advance=
'no')  trim(extra)
 
  397      if (
present(system_iteration)) 
then 
  398        write(iunit, 
'(" | system_clock:", E15.5)' , advance=
'no')  system_iteration%value()
 
  401      if (
present(algo_iteration)) 
then 
  402        write(iunit, 
'(" | prop_clock:", E15.5)' , advance=
'no')  algo_iteration%value()
 
  405      if (
present(interaction_iteration)) 
then 
  406        write(iunit, 
'(" | interaction_clock:", E15.5)' , advance=
'no')  interaction_iteration%value()
 
  409      if (
present(partner_iteration)) 
then 
  410        write(iunit, 
'(" | partner_clock:", E15.5)' , advance=
'no')  partner_iteration%value()
 
  413      if (
present(requested_iteration)) 
then 
  414        write(iunit, 
'(" | requested_clock:", E15.5)' , advance=
'no')  requested_iteration%value()
 
  417      write(iunit, 
'()' , advance=
'yes')
 
  419      event_id = event_id + 1
 
This module implements the basic elements defining algorithms.
 
type(debug_t), save, public debug
 
subroutine, public io_close(iunit, grp)
 
integer function, public io_open(file, namespace, action, status, form, position, die, recl, grp)
 
This module implements the multisystem debug functionality.
 
type(event_marker_t) function event_marker_constructor(text)
 
type(event_function_call_t) function event_function_call_constructor(name, op)
 
character(len=max_info_len) function event_function_call_get_info(this)
 
subroutine, public multisystem_debug_write_marker(system_namespace, event)
 
character(len=max_info_len) function event_iteration_update_get_info(this)
 
type(event_iteration_update_t) function event_iteration_update_constructor(name, detail, iteration, action)
 
type(event_handle_t) function, public multisystem_debug_write_event_in(system_namespace, event, extra, system_iteration, algo_iteration, interaction_iteration, partner_iteration, requested_iteration)
 
subroutine, public multisystem_debug_init(filename, namespace, group)
 
type(event_handle_t) function event_handle_constructor(id)
 
subroutine, public multisystem_debug_write_event_out(handle, extra, update, system_iteration, algo_iteration, interaction_iteration, partner_iteration, requested_iteration)
 
character(len=max_info_len) function event_marker_get_info(this)
 
subroutine, public multisystem_debug_end()
 
Descriptor of one algorithmic operation.
 
This class implements the iteration counter used by the multisystem algorithms. As any iteration coun...
 
This is defined even when running serial.
 
events marking a function call
 
handle to keep track of in- out- events
 
abstract class to specify events in the algorithm execution
 
events marking an iteration update