tem_load_env_params Subroutine

public subroutine tem_load_env_params(conf)

Load globally configurable environment parameters from the config script

Arguments

Type IntentOptional Attributes Name
type(flu_State) :: conf

lua state to load information from


Calls

proc~~tem_load_env_params~~CallsGraph proc~tem_load_env_params tem_load_env_params aot_get_val aot_get_val proc~tem_load_env_params->aot_get_val

Called by

proc~~tem_load_env_params~~CalledByGraph proc~tem_load_env_params tem_load_env_params proc~tem_load_general tem_load_general proc~tem_load_general->proc~tem_load_env_params

Source Code

  subroutine tem_load_env_params( conf )
    ! ---------------------------------------------------------------------------
    !> lua state to load information from
    type(flu_state) :: conf
    ! ---------------------------------------------------------------------------
    real    :: sizeMB
    integer :: iError
    ! ---------------------------------------------------------------------------
    ! Get the io_buffer_size from a given lua file
    call aot_get_val( L       = conf,                                          &
      &               key     = 'io_buffer_size',                              &
      &               val     = sizeMB,                                        &
      &               ErrCode = iError,                                        &
      &               default = 8. )

    ! Get the null device which might be used to do outputs without effect.
    call aot_get_val( L       = conf,                                          &
      &               key     = 'null_device',                                 &
      &               val     = null_device,                                   &
      &               ErrCode = iError,                                        &
      &               default = '/dev/null')

    ! Configure, if we are to write the Runtime info in tem_finalize
    call aot_get_val( L       = conf,                                          &
      &               key     = 'printRuntimeInfo',                            &
      &               val     = printRuntimeInfo,                              &
      &               ErrCode = iError,                                        &
      &               default = .true. )

    ! Calculate the size of the buffer array and store it in io_buffer_size.
    ! The buffer is supposed to be built up by 8 byte reals, thus for a total
    ! size given in MB, the number entries is given by sizeMB * 1024*1024/8.
    io_buffer_size = int( sizeMB * 131072. )

  end subroutine tem_load_env_params