tem_trackmem_load Subroutine

public subroutine tem_trackmem_load(me, conf)

Get a trackmem_file setting from the config script.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(out) :: me

The trackmem file

type(flu_State) :: conf

Handle to the Lua script containing the configuration.


Calls

proc~~tem_trackmem_load~~CallsGraph proc~tem_trackmem_load tem_trackmem_load proc~aot_get_val~2 aot_get_val proc~tem_trackmem_load->proc~aot_get_val~2

Contents

Source Code


Source Code

  subroutine tem_trackmem_load( me, conf )
    ! ---------------------------------------------------------------------------
    !> The trackmem file
    character(len=*), intent(out) :: me
    !> Handle to the Lua script containing the configuration.
    type(flu_state) :: conf
    ! ---------------------------------------------------------------------------
    integer :: iError
    ! ---------------------------------------------------------------------------

    ! load trackmem_file
    call aot_get_val( L       = conf,            &
      &               key     = 'trackmem_file', &
      &               val     = me,              &
      &               ErrCode = iError,          &
      &               default = ''               )

    if (trim(me) /= '') then
      write(logunit(1),*) ''
      write(logunit(1),*) 'Will track memory consumption into file:'
      write(logunit(1),*) trim(me)
      write(logunit(1),*) 'ATTENTION: This is a slow operation!!!'
      write(logunit(1),*) 'Deactivate the trackmem_file setting for production.'
      write(logunit(1),*) ''
    end if

  end subroutine tem_trackmem_load