Counted allocatable footprint of the wide-halo BT shadow state
(0 when unallocated, i.e. whenever &ocean_bt_nml bt_halo = 0).
Every term here is device-mapped by bt_wide_enter_data_impl and
was previously counted by nothing — ocean_dyn_bytes omitted the
slot entirely because this function did not exist. ~436 MB at
1000x800 with bt_halo = 10, nghost = 4. One arr_bytes term
per array: add one here when a new allocatable joins the type.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(bt_wide_t), | intent(in) | :: | this |
pure function bt_wide_bytes(this) result(nbytes) !! Counted allocatable footprint of the wide-halo BT shadow state !! (0 when unallocated, i.e. whenever `&ocean_bt_nml bt_halo = 0`). !! !! Every term here is device-mapped by `bt_wide_enter_data_impl` and !! was previously counted by nothing — `ocean_dyn_bytes` omitted the !! slot entirely because this function did not exist. ~436 MB at !! 1000x800 with `bt_halo = 10, nghost = 4`. One `arr_bytes` term !! per array: add one here when a new allocatable joins the type. class(bt_wide_t), intent(in) :: this integer(int64) :: nbytes nbytes = this%metrics_w%bytes() & + arr_bytes(this%f_corner_w) & + arr_bytes(this%w_eta) & + arr_bytes(this%w_H_ref) & + arr_bytes(this%w_eta_new) & + arr_bytes(this%w_ke) & + arr_bytes(this%w_eta_sum) & + arr_bytes(this%w_eta_end) & + arr_bytes(this%w_ubt) & + arr_bytes(this%w_ubt_prev) & + arr_bytes(this%w_rem_u) & + arr_bytes(this%w_ubt_sum) & + arr_bytes(this%w_uhbt_sum) & + arr_bytes(this%w_uhbt) & + arr_bytes(this%w_ubt_end) & + arr_bytes(this%w_vbt) & + arr_bytes(this%w_vbt_prev) & + arr_bytes(this%w_rem_v) & + arr_bytes(this%w_vbt_sum) & + arr_bytes(this%w_vhbt_sum) & + arr_bytes(this%w_vhbt) & + arr_bytes(this%w_vbt_end) & + arr_bytes(this%w_zeta) & + arr_bytes(this%w_force_u) & + arr_bytes(this%w_force_v) end function bt_wide_bytes