KTH framework for Nek5000 toolboxes; testing version  0.0.1

Monitoring routines for toolboxes. More...

+ Collaboration diagram for Monitoring module:

Files

file  mntrlog.f
 Set of module register and logging routines for KTH framework.
 
file  mntrlog_block.f
 Block data to initialise common blocks in MNTRLOGD.
 
file  mntrtmr.f
 Set of timer database routines for KTH framework.
 
file  mntrtmr_block.f
 Block data to initialise common blocks in MNTRTMRD.
 

Functions

subroutine mntr_register_mod (log_thr)
 Initialise monitor by registering framework and monitor. More...
 
subroutine mntr_register_par
 Register monitor runtime parameters. More...
 
subroutine mntr_init
 Initialise monitor module. More...
 
subroutine mntr_wclock
 Monitor simulation wall clock. More...
 
subroutine mntr_set_step_delay (dstep)
 Set number of steps necessary to write proper checkpointing. More...
 
subroutine mntr_get_step_delay (dstep)
 Get step delay. More...
 
subroutine mntr_set_conv (ifconv)
 Set convergence flag to shorten simulation. More...
 
logical function mntr_is_initialised ()
 Check if module was initialised. More...
 
integer function mntr_lp_def_get ()
 Get logging threashold. More...
 
subroutine mntr_mod_reg (mid, pmid, mname, mdscr)
 Register new module. More...
 
subroutine mntr_mod_is_name_reg (mid, mname)
 Check if module name is registered and return its id. More...
 
logical function mntr_mod_is_id_reg (mid)
 Check if module id is registered. This operation is performed locally. More...
 
subroutine mntr_mod_get_number (nmod, mmod)
 Get number of registered modules. This operation is performed locally. More...
 
subroutine mntr_mod_get_info (mname, pmid, mid)
 Get module name an parent id for given module id. This operation is performed locally. More...
 
subroutine mntr_log (mid, priority, logs)
 Write log message. More...
 
subroutine mntr_log_local (mid, priority, logs, prid)
 Write log message from given process. More...
 
subroutine mntr_logi (mid, priority, logs, ivar)
 Write log message adding single integer. More...
 
subroutine mntr_logr (mid, priority, logs, rvar)
 Write log message adding single real. More...
 
subroutine mntr_logrv (mid, priority, logs, rvarv, rvarn)
 Write log message adding real vector of length n. More...
 
subroutine mntr_logl (mid, priority, logs, lvar)
 Write log message adding single logical. More...
 
subroutine mntr_warn (mid, logs)
 Write warning message. More...
 
subroutine mntr_error (mid, logs)
 Write error message. More...
 
subroutine mntr_abort (mid, logs)
 Abort simulation. More...
 
subroutine mntr_check_abort (mid, ierr, logs)
 Abort simulation. More...
 
subroutine mntr_mod_summary_print ()
 Print registered modules showing tree structure. More...
 
subroutine mntr_mod_get_olist (olist, ierr)
 Provide ordered list of registered modules for printing. More...
 
recursive subroutine mntr_build_ord_list (olist, slist, nlist, npos, parent, level)
 Build ordered list reflecting graph structure. More...
 
subroutine mntr_tmr_reg (mid, pmid, modid, mname, mdscr, ifsum)
 Register new timer. More...
 
subroutine mntr_tmr_is_name_reg (mid, mname)
 Check if timer name is registered and return its id. More...
 
logical function mntr_tmr_is_id_reg (mid)
 Check if timer id is registered. This operation is performed locally. More...
 
subroutine mntr_tmr_add (mid, icount, time)
 Check if timer id is registered. This operation is performed locally. More...
 
subroutine mntr_tmr_summary_print ()
 Print registered timers showing tree structure. More...
 
subroutine mntr_tmr_get_olist (olist, ierr)
 Provide ordered list of registered timers for printing. More...
 

Detailed Description

Monitoring routines for toolboxes.

Monitor module provides basic services allowing to monitor tooboxes during the simulation. Its basic tasks are module registration, timing and message logging which is done by building dynamical databases. Maximun number of registered modules and timers are defned by (mntr_id_max) and (mntr_tmr_id_max) parameters in MNTRLOGD and MNTRTMRD include files, respectively. Logging verbosity can be set using FRAMELP include file provided by framework module.

This module is automatically registered by framework and should not be registered inside (frame_usr_register).

Module interface:
Global interface list:
Interface provided:
  1. mntr_set_step_delay
  2. mntr_get_step_delay
  3. mntr_set_conv
  4. mntr_is_initialised
  5. mntr_lp_def_get
  6. mntr_mod_reg
  7. mntr_mod_is_name_reg
  8. mntr_mod_is_id_reg
  9. mntr_mod_get_number
  10. mntr_mod_get_info
  11. mntr_log
  12. mntr_log_local
  13. mntr_logi
  14. mntr_logr
  15. mntr_logrv
  16. mntr_logl
  17. mntr_warn
  18. mntr_error
  19. mntr_abort
  20. mntr_check_abort
  21. mntr_tmr_reg
  22. mntr_tmr_is_name_reg
  23. mntr_tmr_is_id_reg
  24. mntr_tmr_add
Module parameters:
Global parameter list:
Parameters provided by monitor module (include file - MNTRLOGD):
Varaible Type Runtime parameter Default value Description
mntr_lp_def integer _mntr:loglevel lp_inf Logging threshold for toolboxes
mntr_iftdsc logical _mntr:iftimdscr .false. Write timer description in the summary
mntr_wtimes string _mntr:WallTime 00:00 simulation wall time
Module parameter usage:
[_MNTR] # Runtime parameter section for monitor module
LOGLEVEL = 4 # Logging threshold for toolboxes
IFTIMDSCR = no # Write timer description in the summary
WALLTIME = 00:45 # Simulation wall time

Function Documentation

◆ mntr_abort()

subroutine mntr_abort ( integer  mid,
character*(*)  logs 
)

Abort simulation.

Parameters
[in]midmodule id
[in]logslog body

Definition at line 836 of file mntrlog.f.

References exitt(), and mntr_log().

+ Here is the call graph for this function:

◆ mntr_build_ord_list()

recursive subroutine mntr_build_ord_list ( integer, dimension(2,nlist)  olist,
integer, dimension(2,nlist)  slist,
integer  nlist,
integer  npos,
integer  parent,
integer  level 
)

Build ordered list reflecting graph structure.

Parameters
[out]olistordered list
[in,out]slistlist sorted with respect to parent
[in]nlistlists length
[in,out]nposposition in olist array
[in]parentparent id
[in]levelparent level

Definition at line 1012 of file mntrlog.f.

+ Here is the caller graph for this function:

◆ mntr_check_abort()

subroutine mntr_check_abort ( integer  mid,
integer  ierr,
character*(*)  logs 
)

Abort simulation.

Parameters
[in]midmodule id
[in]ierrerror flag
[in]logslog body

Definition at line 855 of file mntrlog.f.

References exitt(), and mntr_log().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mntr_error()

subroutine mntr_error ( integer  mid,
character*(*)  logs 
)

Write error message.

Parameters
[in]midmodule id
[in]logslog body

Definition at line 819 of file mntrlog.f.

References mntr_log().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mntr_get_step_delay()

subroutine mntr_get_step_delay ( integer  dstep)

Get step delay.

Parameters
[out]dstepstep delay

Definition at line 276 of file mntrlog.f.

+ Here is the caller graph for this function:

◆ mntr_init()

subroutine mntr_init

Initialise monitor module.

Definition at line 134 of file mntrlog.f.

References mntr_log(), mntr_mod_summary_print(), and rprm_rp_get().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mntr_is_initialised()

logical function mntr_is_initialised

Check if module was initialised.

Returns
mntr_is_initialised

Definition at line 312 of file mntrlog.f.

◆ mntr_log()

subroutine mntr_log ( integer  mid,
integer  priority,
character*(*)  logs 
)

Write log message.

Parameters
[in]midmodule id
[in]prioritylog priority
[in]logslog body

Definition at line 599 of file mntrlog.f.

References blank().

+ Here is the call graph for this function:

◆ mntr_log_local()

subroutine mntr_log_local ( integer  mid,
integer  priority,
character*(*)  logs,
integer  prid 
)

Write log message from given process.

Parameters
[in]midmodule id
[in]prioritylog priority
[in]logslog body
[in]pridprocess id

Definition at line 654 of file mntrlog.f.

References blank().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mntr_logi()

subroutine mntr_logi ( integer  mid,
integer  priority,
character*(*)  logs,
integer  ivar 
)

Write log message adding single integer.

Parameters
[in]midmodule id
[in]prioritylog priority
[in]logslog body
[in]ivarinteger variable

Definition at line 708 of file mntrlog.f.

References mntr_log().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mntr_logl()

subroutine mntr_logl ( integer  mid,
integer  priority,
character*(*)  logs,
logical  lvar 
)

Write log message adding single logical.

Parameters
[in]midmodule id
[in]prioritylog priority
[in]logslog body
[in]lvarlogical variable

Definition at line 781 of file mntrlog.f.

References mntr_log().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mntr_logr()

subroutine mntr_logr ( integer  mid,
integer  priority,
character*(*)  logs,
real  rvar 
)

Write log message adding single real.

Parameters
[in]midmodule id
[in]prioritylog priority
[in]logslog body
[in]rvarreal variable

Definition at line 730 of file mntrlog.f.

References mntr_log().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mntr_logrv()

subroutine mntr_logrv ( integer  mid,
integer  priority,
character*(*)  logs,
real, dimension(rvarn)  rvarv,
integer  rvarn 
)

Write log message adding real vector of length n.

Parameters
[in]midmodule id
[in]prioritylog priority
[in]logslog body
[in]rvarvreal vector
[in]rvarnvector length

Definition at line 754 of file mntrlog.f.

References mntr_log().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mntr_lp_def_get()

integer function mntr_lp_def_get

Get logging threashold.

Returns
mntr_lp_def_get

Definition at line 327 of file mntrlog.f.

◆ mntr_mod_get_info()

subroutine mntr_mod_get_info ( character*10  mname,
integer  pmid,
integer  mid 
)

Get module name an parent id for given module id. This operation is performed locally.

Parameters
[out]pmidparent module id
[out]mnamemodule name
[in,out]midmodule id

Definition at line 567 of file mntrlog.f.

References mntr_log().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mntr_mod_get_number()

subroutine mntr_mod_get_number ( integer  nmod,
integer  mmod 
)

Get number of registered modules. This operation is performed locally.

Parameters
[out]nmodmodule number
[out]mmodmax module id

Definition at line 546 of file mntrlog.f.

◆ mntr_mod_get_olist()

subroutine mntr_mod_get_olist ( integer, dimension(2,mntr_id_max)  olist,
integer  ierr 
)

Provide ordered list of registered modules for printing.

Parameters
[out]olistordered list
[out]ierrerror flag

Definition at line 928 of file mntrlog.f.

References ituple_sort(), mntr_build_ord_list(), and mntr_log_local().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mntr_mod_is_id_reg()

logical function mntr_mod_is_id_reg ( integer  mid)

Check if module id is registered. This operation is performed locally.

Parameters
[in]midmodule id
Returns
mntr_mod_is_id_reg

Definition at line 526 of file mntrlog.f.

◆ mntr_mod_is_name_reg()

subroutine mntr_mod_is_name_reg ( integer  mid,
character*(*)  mname 
)

Check if module name is registered and return its id.

Parameters
[out]midmodule id
[in]mnamemodule name

Definition at line 458 of file mntrlog.f.

References bcast(), blank(), capit(), and mntr_log().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mntr_mod_reg()

subroutine mntr_mod_reg ( integer  mid,
integer  pmid,
character*(*)  mname,
character*(*)  mdscr 
)

Register new module.

Parameters
[out]midcurrent module id
[in]pmidparent module id
[in]mnamemodule name
[in]mdscrmodule description

Definition at line 345 of file mntrlog.f.

References bcast(), blank(), capit(), mntr_abort(), and mntr_log().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mntr_mod_summary_print()

subroutine mntr_mod_summary_print

Print registered modules showing tree structure.

Definition at line 889 of file mntrlog.f.

References mntr_log(), and mntr_mod_get_olist().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mntr_register_mod()

subroutine mntr_register_mod ( integer  log_thr)

Initialise monitor by registering framework and monitor.

Parameters
[in]log_thrinitial log threshold

Definition at line 10 of file mntrlog.f.

References mntr_log(), and mntr_tmr_reg().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mntr_register_par()

subroutine mntr_register_par

Register monitor runtime parameters.

Definition at line 99 of file mntrlog.f.

References rprm_rp_reg(), rprm_sec_reg(), and rprm_sec_set_act().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mntr_set_conv()

subroutine mntr_set_conv ( logical  ifconv)

Set convergence flag to shorten simulation.

Definition at line 293 of file mntrlog.f.

+ Here is the caller graph for this function:

◆ mntr_set_step_delay()

subroutine mntr_set_step_delay ( integer  dstep)

Set number of steps necessary to write proper checkpointing.

Parameters
[in]dstepstep delay

Definition at line 253 of file mntrlog.f.

References mntr_abort().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mntr_tmr_add()

subroutine mntr_tmr_add ( integer  mid,
integer  icount,
real  time 
)

Check if timer id is registered. This operation is performed locally.

Parameters
[in]midtimer id
[in]icountcount increase
[in]timetime increase

Definition at line 236 of file mntrtmr.f.

References mntr_log().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mntr_tmr_get_olist()

subroutine mntr_tmr_get_olist ( integer, dimension(2,mntr_tmr_id_max)  olist,
integer  ierr 
)

Provide ordered list of registered timers for printing.

Parameters
[out]olistordered list
[out]ierrerror flag

Definition at line 385 of file mntrtmr.f.

References ituple_sort(), mntr_build_ord_list(), and mntr_log().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mntr_tmr_is_id_reg()

logical function mntr_tmr_is_id_reg ( integer  mid)

Check if timer id is registered. This operation is performed locally.

Parameters
[in]midtimer id
Returns
mntr_tmr_is_id_reg

Definition at line 214 of file mntrtmr.f.

◆ mntr_tmr_is_name_reg()

subroutine mntr_tmr_is_name_reg ( integer  mid,
character*(*)  mname 
)

Check if timer name is registered and return its id.

Parameters
[out]midtimer id
[in]mnametimer name

Definition at line 145 of file mntrtmr.f.

References bcast(), blank(), capit(), and mntr_log().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mntr_tmr_reg()

subroutine mntr_tmr_reg ( integer  mid,
integer  pmid,
integer  modid,
character*(*)  mname,
character*(*)  mdscr,
logical  ifsum 
)

Register new timer.

Parameters
[out]midnew timer id
[in]pmidparent timer id
[in]modidregisterring module id
[in]mnametimer name
[in]mdscrtimer description
[in]ifsumadd timer to parent

Definition at line 15 of file mntrtmr.f.

References bcast(), blank(), capit(), mntr_abort(), and mntr_log().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mntr_tmr_summary_print()

subroutine mntr_tmr_summary_print

Print registered timers showing tree structure.

Definition at line 268 of file mntrtmr.f.

References mntr_error(), mntr_log(), mntr_tmr_add(), and mntr_tmr_get_olist().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mntr_warn()

subroutine mntr_warn ( integer  mid,
character*(*)  logs 
)

Write warning message.

Parameters
[in]midmodule id
[in]logslog body

Definition at line 802 of file mntrlog.f.

References mntr_log().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mntr_wclock()

subroutine mntr_wclock

Monitor simulation wall clock.

Definition at line 190 of file mntrlog.f.

References bcast(), dnekclock(), and mntr_log().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: