KTH framework for Nek5000 toolboxes; testing version  0.0.1

Routines related to module's runtime parameters. More...

+ Collaboration diagram for Runtime parameters:

Files

file  rprm.f
 Set of subroutines related to module's runtime parameters.
 
file  rprm_block.f
 Block data to initialise common block for runtime parameter module.
 

Functions

subroutine rprm_register
 Register runtime parameters database. More...
 
subroutine rprm_init
 Initialise modules runtime parameters and write summary. More...
 
logical function rprm_is_initialised ()
 Check if module was initialised. More...
 
subroutine rprm_sec_reg (rpid, mid, pname, pdscr)
 Register new parameter section. More...
 
subroutine rprm_sec_is_name_reg (rpid, mid, pname)
 Check if section name is registered and return its id. Check mid as well. More...
 
logical function rprm_sec_is_id_reg (rpid)
 Check if section id is registered. This operation is performed locally. More...
 
subroutine rprm_sec_get_info (pname, mid, ifact, rpid)
 Get section info based on its id. This operation is performed locally. More...
 
subroutine rprm_sec_set_act (ifact, rpid)
 Set section's activation flag. Master value is broadcasted. More...
 
logical function rprm_sec_is_id_act (rpid)
 Check if section id is registered and activated. This operation is performed locally. More...
 
subroutine rprm_rp_reg (rpid, mid, pname, pdscr, ptype, ipval, rpval, lpval, cpval)
 Register new runtime parameter. More...
 
subroutine rprm_rp_is_name_reg (rpid, mid, pname, ptype)
 Check if parameter name is registered and return its id. Check flags as well. More...
 
logical function rprm_rp_is_id_reg (rpid, ptype)
 Check if parameter id is registered and check type consistency. This operation is performed locally. More...
 
subroutine rprm_rp_get_info (pname, mid, ptype, rpid)
 Get parameter info based on its id. This operation is performed locally. More...
 
subroutine rprm_rp_set (rpid, ptype, ipval, rpval, lpval, cpval)
 Set runtime parameter of active section. Master value is broadcasted. More...
 
subroutine rprm_rp_get (ipval, rpval, lpval, cpval, rpid, ptype)
 Get runtime parameter form active section. This operation is performed locally. More...
 
subroutine rprm_dict_get ()
 Get runtime parameter from nek parser dictionary. More...
 
subroutine rprm_rp_summary_print (unit)
 Print out summary of registered runtime parameters (active sections only) More...
 
subroutine rprm_check (mod_nkeys, mod_dictkey, mod_n3dkeys, mod_l3dkey, ifsec)
 Check consistency of module's runtime parameters. More...
 

Detailed Description

Routines related to module's runtime parameters.

This module builds a global parameter database for all registered tools. Maximun number of registered runtime parameters and runtime parameter sections are defned by (rprm_par_id_max) and (rprm_sec_id_max) parameters in RPRMD include files.

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

Module interface:
Global interface list:
Interface provided:
  1. rprm_register (to frame)
  2. rprm_init (to frame)
  3. rprm_is_initialised
  4. rprm_sec_reg
  5. rprm_sec_is_name_reg
  6. rprm_sec_is_id_reg
  7. rprm_sec_get_info
  8. rprm_sec_is_id_act
  9. rprm_sec_set_act
  10. rprm_rp_reg
  11. rprm_rp_is_name_reg
  12. rprm_rp_is_id_reg
  13. rprm_rp_get_info
  14. rprm_rp_set
  15. rprm_rp_get
  16. rprm_dict_get
  17. rprm_rp_summary_print (to frame)
  18. rprm_check (deprecated)
Module parameters:
Global parameter list:
Parameters provided by runtime parameter module (include file - RPRMD):
Varaible Type Runtime parameter Default value Description
rprm_ifpar logical _rprm:parfwrite .false. Do we write runtime parameter file
rprm_parfnm string _rprm:parfname outparfile Runtime parameter file name for output (without .par)
Module parameter usage:
[_RPRM] # Runtime parameter section for rprm module
PARFWRITE = no # Do we write runtime parameter file
PARFNAME = outparfile # Runtime parameter file name for output (without .par)

Function Documentation

◆ rprm_check()

subroutine rprm_check ( integer  mod_nkeys,
character*132, dimension(mod_nkeys)  mod_dictkey,
integer  mod_n3dkeys,
integer, dimension(mod_n3dkeys)  mod_l3dkey,
logical  ifsec 
)

Check consistency of module's runtime parameters.

Parameters
[in]mod_nkeysnumber of module's keys
[in]mod_dictkeymodule's dictionary keys
[in]mod_n3dkeysnumber of keys used for 3D run only
[in]mod_l3dkeylist of positions of 3D keys
[out]ifsecis section present

Check if the section name shows up and runtime parameters are spelled correctly. Give warning if section is missing, or the key is unknown. Check possible 2D - 3D parameter mismatch.

Warning
This routine is deprecated.

Definition at line 1197 of file rprm.f.

References capit(), and mntr_log().

+ Here is the call graph for this function:

◆ rprm_dict_get()

subroutine rprm_dict_get

Get runtime parameter from nek parser dictionary.

Definition at line 932 of file rprm.f.

References bcast(), capit(), and mntr_warn().

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

◆ rprm_init()

subroutine rprm_init

Initialise modules runtime parameters and write summary.

Definition at line 86 of file rprm.f.

References io_file_freeid(), mntr_log(), mntr_warn(), rprm_rp_get(), and rprm_rp_summary_print().

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

◆ rprm_is_initialised()

logical function rprm_is_initialised

Check if module was initialised.

Returns
rprm_is_initialised

Definition at line 146 of file rprm.f.

◆ rprm_register()

subroutine rprm_register

Register runtime parameters database.

Definition at line 9 of file rprm.f.

References mntr_abort(), mntr_mod_is_name_reg(), mntr_mod_reg(), mntr_warn(), 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:

◆ rprm_rp_get()

subroutine rprm_rp_get ( integer  ipval,
real  rpval,
logical  lpval,
character*20  cpval,
integer  rpid,
integer  ptype 
)

Get runtime parameter form active section. This operation is performed locally.

Parameters
[out]ipvalinteger value
[out]rpvalreal value
[out]lpvallogical value
[out]cpvalstring value
[in]rpidruntime parameter id
[in]ptypeparameter type

Definition at line 882 of file rprm.f.

References mntr_abort(), and mntr_warn().

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

◆ rprm_rp_get_info()

subroutine rprm_rp_get_info ( character*20  pname,
integer  mid,
integer  ptype,
integer  rpid 
)

Get parameter info based on its id. This operation is performed locally.

Parameters
[out]pnameparameter name
[out]midsection id
[out]ptypeparameter type
[in,out]rpidruntime parameter id

Definition at line 764 of file rprm.f.

References mntr_log().

+ Here is the call graph for this function:

◆ rprm_rp_is_id_reg()

logical function rprm_rp_is_id_reg ( integer  rpid,
integer  ptype 
)

Check if parameter id is registered and check type consistency. This operation is performed locally.

Parameters
[in]rpidruntime parameter id
[in]ptypeparameter type
Returns
rprm_rp_is_id_reg

Definition at line 742 of file rprm.f.

◆ rprm_rp_is_name_reg()

subroutine rprm_rp_is_name_reg ( integer  rpid,
integer  mid,
character*(*)  pname,
integer  ptype 
)

Check if parameter name is registered and return its id. Check flags as well.

Parameters
[out]rpidruntime parameter id
[in]midsection id
[in]pnameparameter name
[in]ptypeparameter type

Definition at line 657 of file rprm.f.

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

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

◆ rprm_rp_reg()

subroutine rprm_rp_reg ( integer  rpid,
integer  mid,
character*(*)  pname,
character*(*)  pdscr,
integer  ptype,
integer  ipval,
real  rpval,
logical  lpval,
character*(*)  cpval 
)

Register new runtime parameter.

Parameters
[out]rpidcurrent runtime parameter id
[in]midsection id
[in]pnameparameter name
[in]pdscrparamerer description
[in]ptypeparameter type
[in]ipvalinteger default value
[in]rpvalreal default value
[in]lpvallogical default value
[in]cpvalstring default value

Definition at line 482 of file rprm.f.

References bcast(), blank(), capit(), mntr_abort(), mntr_log(), mntr_logi(), mntr_logl(), and mntr_logr().

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

◆ rprm_rp_set()

subroutine rprm_rp_set ( integer  rpid,
integer  ptype,
integer  ipval,
real  rpval,
logical  lpval,
character*(*)  cpval 
)

Set runtime parameter of active section. Master value is broadcasted.

Parameters
[in]rpidruntime parameter id
[in]ptypeparameter type
[in]ipvalinteger value
[in]rpvalreal value
[in]lpvallogical value
[in]cpvalstring value

Definition at line 800 of file rprm.f.

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

+ Here is the call graph for this function:

◆ rprm_rp_summary_print()

subroutine rprm_rp_summary_print ( integer  unit)

Print out summary of registered runtime parameters (active sections only)

Parameters
[in]unitI/O unit (6 - standard I/O)

Definition at line 1051 of file rprm.f.

References ituple_sort(), and mntr_log().

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

◆ rprm_sec_get_info()

subroutine rprm_sec_get_info ( character*20  pname,
integer  mid,
logical  ifact,
integer  rpid 
)

Get section info based on its id. This operation is performed locally.

Parameters
[out]pnamesection name
[out]midregistering module id
[out]ifactactivation flag
[in,out]rpidsection id

Definition at line 382 of file rprm.f.

References mntr_log().

+ Here is the call graph for this function:

◆ rprm_sec_is_id_act()

logical function rprm_sec_is_id_act ( integer  rpid)

Check if section id is registered and activated. This operation is performed locally.

Parameters
[in]rpidsection id
Returns
rprm_sec_id_id_act

Definition at line 455 of file rprm.f.

◆ rprm_sec_is_id_reg()

logical function rprm_sec_is_id_reg ( integer  rpid)

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

Parameters
[in]rpidsection id
Returns
rprm_sec_is_id_reg

Definition at line 361 of file rprm.f.

◆ rprm_sec_is_name_reg()

subroutine rprm_sec_is_name_reg ( integer  rpid,
integer  mid,
character*(*)  pname 
)

Check if section name is registered and return its id. Check mid as well.

Parameters
[out]rpidsection id
[in]midregistering module id
[in]pnamesection name

Definition at line 283 of file rprm.f.

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

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

◆ rprm_sec_reg()

subroutine rprm_sec_reg ( integer  rpid,
integer  mid,
character*(*)  pname,
character*(*)  pdscr 
)

Register new parameter section.

Parameters
[out]rpidcurrent section id
[in]midregistering module id
[in]pnamesection name
[in]pdscrsection description

Definition at line 164 of file rprm.f.

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

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

◆ rprm_sec_set_act()

subroutine rprm_sec_set_act ( logical  ifact,
integer  rpid 
)

Set section's activation flag. Master value is broadcasted.

This routine is added because Nek5000 uses existence of section in .par file itself as a variable, what introduces problem with their registration as sections should be registered before reading runtime parameter file. That is why I decided to split registration and activation stages. One can register all the possible sections and activate those present in .par

Parameters
[in]ifactactivation flag
[in]rpidruntime parameter id

Definition at line 421 of file rprm.f.

References bcast(), and mntr_abort().

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