FMS  2024.03
Flexible Modeling System
mpp_memutils_mod

Routines to initialize and report on memory usage during the model run. More...

Functions/Subroutines

subroutine, public mpp_mem_dump (memuse)
 Return the memory high water mark in MiB. More...
 
subroutine, public mpp_memuse_begin
 Initialize the memory module, and record the initial memory use.
 
subroutine, public mpp_memuse_end (text, unit)
 End the memory collection, and report on total memory used during the execution of the model run. More...
 
subroutine, public mpp_print_memuse_stats (text, unit)
 Print the current memory high water mark to stderr, or the unit specified. More...
 

Variables

logical memuse_started = .false.
 

Detailed Description

Routines to initialize and report on memory usage during the model run.

Function/Subroutine Documentation

◆ mpp_mem_dump()

subroutine, public mpp_memutils_mod::mpp_mem_dump ( real, intent(out)  memuse)

Return the memory high water mark in MiB.

Query the system for the memory high water mark, return the result in MiB.

Parameters
[out]memuseMemory, high water mark, in MiB

Definition at line 110 of file mpp_memutils.F90.

◆ mpp_memuse_end()

subroutine, public mpp_memutils_mod::mpp_memuse_end ( character(len=*), intent(in)  text,
integer, intent(in), optional  unit 
)

End the memory collection, and report on total memory used during the execution of the model run.

Parameters
[in]textText to include in memory use statement
[in]unitFortran unit number where memory report should go. Default is stderr.

Definition at line 56 of file mpp_memutils.F90.

◆ mpp_print_memuse_stats()

subroutine, public mpp_memutils_mod::mpp_print_memuse_stats ( character(len=*), intent(in)  text,
integer, intent(in), optional  unit 
)

Print the current memory high water mark to stderr, or the unit specified.

Parameters
[in]textText to include in memory print statement
[in]unitFortran unit number where print statement should go. Default is stderr.

Definition at line 85 of file mpp_memutils.F90.