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. |
Get the value of verbosity, reading the enviroment variable GK_VERBOSITY if necessary.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 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 |
Returns whether current version is a release
Returns whether current version is a release
Returns the release number
Returns the release number
Returns whether a PGI compiler was used
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Tests for compilers !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Returns whether a PGI compiler was used
Returns the name of the compiler used
Returns the name of the compiler used
Returns the value of the "fedora" environment variable
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! System info !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Returns the value of the "fedora" environment variable
Returns an identifier of the system and build: "system.compiler.githash".
Returns an identifier of the system and build: "system.compiler.githash".
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(runtime_info_type), | intent(inout) | :: | self |
Returns the git hash
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 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
Returns whether the source code has been modified relative to the repository version
type :: runtime_info_type
private
!> Integer determining the verbosity of debugging output, with higher
!! values being more verbose. `verbosity` is read from the
!! GK_VERBOSITY environment variable
integer :: verbosity
!> 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]].
logical :: verbosity_initialized = .false.
contains
!> Get the value of [[verbosity]], reading the enviroment variable
!! GK_VERBOSITY if necessary.
procedure :: get_verbosity
!> Returns whether current version is a release
procedure, nopass :: is_release => is_release_runtime_info
!> Returns the release number
procedure, nopass :: release => release_runtime_info
!> Returns whether a PGI compiler was used
procedure, nopass :: compiler_pgi => compiler_pgi_runtime_info
!> Returns the name of the compiler used
procedure, nopass :: get_compiler_name
!> Returns the value of the GK_SYSTEM environment variable
procedure, nopass :: get_gk_system
!> Returns an identifier of the system and build:
!! "system.compiler.githash".
procedure :: build_identifier => build_identifier_runtime_info
!> Returns the git hash
procedure, nopass :: get_git_hash => get_git_hash_runtime_info
!> Returns whether the source code has been modified relative to the
!! repository version
procedure, nopass :: get_git_modified => get_git_modified_runtime_info
end type runtime_info_type