This module is intended to be used for runtime tests which interrogate what is functional/what compile time options were enabled/disabled, and also any enviroment variables which affect what happens at runtime.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(runtime_info_type), | public | :: | runtime_info |
Type providing information about the code version, compiler, build environment etc
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | private | :: | verbosity |
Integer determining the verbosity of debugging output, with higher
values being more verbose. |
|||
logical, | private | :: | verbosity_initialized | = | .false. |
Whether verbosity has already been read from the environment variable. Reading environment variables is moderately expensive, so this is done once and the value stored in verbosity. |
procedure , public , :: get_verbosity Function | Get the value of verbosity, reading the enviroment variable GK_VERBOSITY if necessary. |
procedure , public , nopass :: is_release => is_release_runtime_info Function | Returns whether current version is a release |
procedure , public , nopass :: release => release_runtime_info Function | Returns the release number |
procedure , public , nopass :: compiler_pgi => compiler_pgi_runtime_info Function | Returns whether a PGI compiler was used |
procedure , public , nopass :: get_compiler_name Function | Returns the name of the compiler used |
procedure , public , nopass :: get_gk_system Function | Returns the value of the "fedora" environment variable |
procedure , public , :: build_identifier => build_identifier_runtime_info Function | Returns an identifier of the system and build: "system.compiler.githash". |
procedure , public , nopass :: get_git_hash => get_git_hash_runtime_info Function | Returns the git hash |
procedure , public , nopass :: get_git_modified => get_git_modified_runtime_info Function | Returns whether the source code has been modified relative to the repository version |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Tests for compilers !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Returns whether a PGI compiler was used
Returns the name of the compiler used
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Tests for git info !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Returns the git hash
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in), | optional | :: | length_in |
Returns whether the source code has been modified relative to the repository version
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! System info !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Returns the value of the "fedora" environment variable
Returns an identifier of the system and build: "system.compiler.githash".
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(runtime_info_type), | intent(inout) | :: | self |
Returns whether current version is a release
Returns the release number
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Testing the runtime environment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! This function interrogates the environment variable GK_VERBOSITY and returns its integer value. This is used to control the level of debug output (not diagnostic/physics output). Normal levels range from 0 to 5, with output getting heavier as the value increases. Values higher than 5 can be used for specialised/very heavy output.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(runtime_info_type), | intent(inout) | :: | self |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Functions provided for backwards compatibility ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! This function is just a call of get_verbosity and is provided for backwards compatibility.
This function is just a call of is_release_runtime_info and is provided for backwards compatibility.
This function is just a call of release_runtime_info and is provided for backwards compatibility.
This function is just a call of get_git_hash_runtime_info and is provided for backwards compatibility.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in), | optional | :: | length_in |
This function is just a call of get_git_modified_runtime_info and is provided for backwards compatibility.
This function is just a call of build_identifier_runtime_info and is provided for backwards compatibility.
This function is just a call of compiler_pgi_runtime_info and is provided for backwards compatibility.