KTH framework for Nek5000 toolboxes; testing version
0.0.1
|
Monitoring routines for toolboxes. More...
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... | |
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).
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 |
subroutine mntr_abort | ( | integer | mid, |
character*(*) | logs | ||
) |
Abort simulation.
[in] | mid | module id |
[in] | logs | log body |
Definition at line 836 of file mntrlog.f.
References exitt(), and mntr_log().
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.
[out] | olist | ordered list |
[in,out] | slist | list sorted with respect to parent |
[in] | nlist | lists length |
[in,out] | npos | position in olist array |
[in] | parent | parent id |
[in] | level | parent level |
Definition at line 1012 of file mntrlog.f.
subroutine mntr_check_abort | ( | integer | mid, |
integer | ierr, | ||
character*(*) | logs | ||
) |
Abort simulation.
[in] | mid | module id |
[in] | ierr | error flag |
[in] | logs | log body |
Definition at line 855 of file mntrlog.f.
References exitt(), and mntr_log().
subroutine mntr_error | ( | integer | mid, |
character*(*) | logs | ||
) |
Write error message.
[in] | mid | module id |
[in] | logs | log body |
Definition at line 819 of file mntrlog.f.
References mntr_log().
subroutine mntr_get_step_delay | ( | integer | dstep | ) |
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().
logical function mntr_is_initialised |
subroutine mntr_log | ( | integer | mid, |
integer | priority, | ||
character*(*) | logs | ||
) |
subroutine mntr_log_local | ( | integer | mid, |
integer | priority, | ||
character*(*) | logs, | ||
integer | prid | ||
) |
subroutine mntr_logi | ( | integer | mid, |
integer | priority, | ||
character*(*) | logs, | ||
integer | ivar | ||
) |
Write log message adding single integer.
[in] | mid | module id |
[in] | priority | log priority |
[in] | logs | log body |
[in] | ivar | integer variable |
Definition at line 708 of file mntrlog.f.
References mntr_log().
subroutine mntr_logl | ( | integer | mid, |
integer | priority, | ||
character*(*) | logs, | ||
logical | lvar | ||
) |
Write log message adding single logical.
[in] | mid | module id |
[in] | priority | log priority |
[in] | logs | log body |
[in] | lvar | logical variable |
Definition at line 781 of file mntrlog.f.
References mntr_log().
subroutine mntr_logr | ( | integer | mid, |
integer | priority, | ||
character*(*) | logs, | ||
real | rvar | ||
) |
Write log message adding single real.
[in] | mid | module id |
[in] | priority | log priority |
[in] | logs | log body |
[in] | rvar | real variable |
Definition at line 730 of file mntrlog.f.
References mntr_log().
subroutine mntr_logrv | ( | integer | mid, |
integer | priority, | ||
character*(*) | logs, | ||
real, dimension(rvarn) | rvarv, | ||
integer | rvarn | ||
) |
Write log message adding real vector of length n.
[in] | mid | module id |
[in] | priority | log priority |
[in] | logs | log body |
[in] | rvarv | real vector |
[in] | rvarn | vector length |
Definition at line 754 of file mntrlog.f.
References mntr_log().
integer function mntr_lp_def_get |
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.
[out] | pmid | parent module id |
[out] | mname | module name |
[in,out] | mid | module id |
Definition at line 567 of file mntrlog.f.
References mntr_log().
subroutine mntr_mod_get_number | ( | integer | nmod, |
integer | mmod | ||
) |
subroutine mntr_mod_get_olist | ( | integer, dimension(2,mntr_id_max) | olist, |
integer | ierr | ||
) |
Provide ordered list of registered modules for printing.
[out] | olist | ordered list |
[out] | ierr | error flag |
Definition at line 928 of file mntrlog.f.
References ituple_sort(), mntr_build_ord_list(), and mntr_log_local().
logical function mntr_mod_is_id_reg | ( | integer | mid | ) |
subroutine mntr_mod_is_name_reg | ( | integer | mid, |
character*(*) | mname | ||
) |
subroutine mntr_mod_reg | ( | integer | mid, |
integer | pmid, | ||
character*(*) | mname, | ||
character*(*) | mdscr | ||
) |
Register new module.
[out] | mid | current module id |
[in] | pmid | parent module id |
[in] | mname | module name |
[in] | mdscr | module description |
Definition at line 345 of file mntrlog.f.
References bcast(), blank(), capit(), mntr_abort(), and mntr_log().
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().
subroutine mntr_register_mod | ( | integer | log_thr | ) |
Initialise monitor by registering framework and monitor.
[in] | log_thr | initial log threshold |
Definition at line 10 of file mntrlog.f.
References mntr_log(), and mntr_tmr_reg().
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().
subroutine mntr_set_conv | ( | logical | ifconv | ) |
subroutine mntr_set_step_delay | ( | integer | dstep | ) |
Set number of steps necessary to write proper checkpointing.
[in] | dstep | step delay |
Definition at line 253 of file mntrlog.f.
References mntr_abort().
subroutine mntr_tmr_add | ( | integer | mid, |
integer | icount, | ||
real | time | ||
) |
Check if timer id is registered. This operation is performed locally.
[in] | mid | timer id |
[in] | icount | count increase |
[in] | time | time increase |
Definition at line 236 of file mntrtmr.f.
References mntr_log().
subroutine mntr_tmr_get_olist | ( | integer, dimension(2,mntr_tmr_id_max) | olist, |
integer | ierr | ||
) |
Provide ordered list of registered timers for printing.
[out] | olist | ordered list |
[out] | ierr | error flag |
Definition at line 385 of file mntrtmr.f.
References ituple_sort(), mntr_build_ord_list(), and mntr_log().
logical function mntr_tmr_is_id_reg | ( | integer | mid | ) |
subroutine mntr_tmr_is_name_reg | ( | integer | mid, |
character*(*) | mname | ||
) |
subroutine mntr_tmr_reg | ( | integer | mid, |
integer | pmid, | ||
integer | modid, | ||
character*(*) | mname, | ||
character*(*) | mdscr, | ||
logical | ifsum | ||
) |
Register new timer.
[out] | mid | new timer id |
[in] | pmid | parent timer id |
[in] | modid | registerring module id |
[in] | mname | timer name |
[in] | mdscr | timer description |
[in] | ifsum | add timer to parent |
Definition at line 15 of file mntrtmr.f.
References bcast(), blank(), capit(), mntr_abort(), and mntr_log().
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().
subroutine mntr_warn | ( | integer | mid, |
character*(*) | logs | ||
) |
Write warning message.
[in] | mid | module id |
[in] | logs | log body |
Definition at line 802 of file mntrlog.f.
References mntr_log().
subroutine mntr_wclock |
Monitor simulation wall clock.
Definition at line 190 of file mntrlog.f.
References bcast(), dnekclock(), and mntr_log().