mem_log_computed_budget Subroutine

public subroutine mem_log_computed_budget(label, total_bytes)

Log the COUNTED state-array footprint. Unlike the RSS figure (host-only I/O buffers + library pages) and the device query (needs an OpenACC runtime), this is an exact sum of the state’s allocatable arrays — available on every toolchain, so a CPU build gets a real footprint line too. Latching for the reconciliation is mem_set_counted_budget (separate, so the print can move to the banner while the latch stays before enter_data).

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: label
integer(kind=int64), intent(in) :: total_bytes

Calls

proc~~mem_log_computed_budget~~CallsGraph proc~mem_log_computed_budget mem_log_computed_budget info info proc~mem_log_computed_budget->info proc~mem_format_bytes mem_format_bytes proc~mem_log_computed_budget->proc~mem_format_bytes proc~two_dp two_dp proc~mem_format_bytes->proc~two_dp

Called by

proc~~mem_log_computed_budget~~CalledByGraph proc~mem_log_computed_budget mem_log_computed_budget proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~mem_log_computed_budget proc~driver_run driver_run proc~driver_run->proc~driver_run_ocean

Source Code

   subroutine mem_log_computed_budget(label, total_bytes)
      !! Log the COUNTED state-array footprint.  Unlike the RSS figure
      !! (host-only I/O buffers + library pages) and the device query
      !! (needs an OpenACC runtime), this is an exact sum of the state's
      !! allocatable arrays — available on every toolchain, so a CPU build
      !! gets a real footprint line too.  Latching for the reconciliation
      !! is `mem_set_counted_budget` (separate, so the print can move to
      !! the banner while the latch stays before `enter_data`).
      character(len=*), intent(in) :: label
      integer(int64), intent(in) :: total_bytes

      ! Two-space indent + four-space breakdown so the block nests cleanly
      ! under the driver's post-setup banner (top-level items at two spaces,
      ! sub-items at four).
      call logger%info("  Memory:   state arrays counted ~ "// &
                       mem_format_bytes(total_bytes)//" ("//trim(label)// &
                       ", exact allocatable footprint)")
   end subroutine mem_log_computed_budget