KTH framework for Nek5000 toolboxes; testing version
0.0.1
|
Routines related to module's runtime parameters. More...
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... | |
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).
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) |
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.
[in] | mod_nkeys | number of module's keys |
[in] | mod_dictkey | module's dictionary keys |
[in] | mod_n3dkeys | number of keys used for 3D run only |
[in] | mod_l3dkey | list of positions of 3D keys |
[out] | ifsec | is 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.
Definition at line 1197 of file rprm.f.
References capit(), and mntr_log().
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().
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().
logical function rprm_is_initialised |
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().
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.
[out] | ipval | integer value |
[out] | rpval | real value |
[out] | lpval | logical value |
[out] | cpval | string value |
[in] | rpid | runtime parameter id |
[in] | ptype | parameter type |
Definition at line 882 of file rprm.f.
References mntr_abort(), and mntr_warn().
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.
[out] | pname | parameter name |
[out] | mid | section id |
[out] | ptype | parameter type |
[in,out] | rpid | runtime parameter id |
Definition at line 764 of file rprm.f.
References mntr_log().
logical function rprm_rp_is_id_reg | ( | integer | rpid, |
integer | ptype | ||
) |
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.
[out] | rpid | runtime parameter id |
[in] | mid | section id |
[in] | pname | parameter name |
[in] | ptype | parameter type |
Definition at line 657 of file rprm.f.
References bcast(), blank(), capit(), and mntr_log().
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.
[out] | rpid | current runtime parameter id |
[in] | mid | section id |
[in] | pname | parameter name |
[in] | pdscr | paramerer description |
[in] | ptype | parameter type |
[in] | ipval | integer default value |
[in] | rpval | real default value |
[in] | lpval | logical default value |
[in] | cpval | string 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().
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.
[in] | rpid | runtime parameter id |
[in] | ptype | parameter type |
[in] | ipval | integer value |
[in] | rpval | real value |
[in] | lpval | logical value |
[in] | cpval | string value |
Definition at line 800 of file rprm.f.
References bcast(), blank(), mntr_abort(), mntr_log(), and mntr_warn().
subroutine rprm_rp_summary_print | ( | integer | unit | ) |
Print out summary of registered runtime parameters (active sections only)
[in] | unit | I/O unit (6 - standard I/O) |
Definition at line 1051 of file rprm.f.
References ituple_sort(), and mntr_log().
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.
[out] | pname | section name |
[out] | mid | registering module id |
[out] | ifact | activation flag |
[in,out] | rpid | section id |
Definition at line 382 of file rprm.f.
References mntr_log().
logical function rprm_sec_is_id_act | ( | integer | rpid | ) |
logical function rprm_sec_is_id_reg | ( | integer | rpid | ) |
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.
[out] | rpid | section id |
[in] | mid | registering module id |
[in] | pname | section name |
Definition at line 283 of file rprm.f.
References bcast(), blank(), capit(), and mntr_log().
subroutine rprm_sec_reg | ( | integer | rpid, |
integer | mid, | ||
character*(*) | pname, | ||
character*(*) | pdscr | ||
) |
Register new parameter section.
[out] | rpid | current section id |
[in] | mid | registering module id |
[in] | pname | section name |
[in] | pdscr | section description |
Definition at line 164 of file rprm.f.
References bcast(), blank(), capit(), mntr_abort(), mntr_log(), and mntr_mod_get_info().
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
[in] | ifact | activation flag |
[in] | rpid | runtime parameter id |
Definition at line 421 of file rprm.f.
References bcast(), and mntr_abort().