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).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | label | |||
| integer(kind=int64), | intent(in) | :: | total_bytes |
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