rdb_debug_chksum_3d Subroutine

private subroutine rdb_debug_chksum_3d(grid, arr, label, field, stage, step, probe, loc)

Location-aware 3D checksum: derives (nx, ny) from grid + loc and nz from the array, so a new instrumentation site is one line with no hand-written bounds. Gated by the probe window.

Arguments

Type IntentOptional Attributes Name
type(hgrid_t), intent(in) :: grid
real(kind=wp), intent(in) :: arr(:,:,:)
character(len=*), intent(in) :: label
character(len=*), intent(in) :: field
integer, intent(in) :: stage
integer, intent(in) :: step
type(chksum_probe_t), intent(inout) :: probe
integer, intent(in) :: loc

Calls

proc~~rdb_debug_chksum_3d~~CallsGraph proc~rdb_debug_chksum_3d rdb_debug_chksum_3d proc~chksum_active chksum_active proc~rdb_debug_chksum_3d->proc~chksum_active proc~chksum_loc_extents chksum_loc_extents proc~rdb_debug_chksum_3d->proc~chksum_loc_extents proc~chksum_loc_interior chksum_loc_interior proc~rdb_debug_chksum_3d->proc~chksum_loc_interior proc~chksum_row chksum_row proc~rdb_debug_chksum_3d->proc~chksum_row proc~chksum_stats_3d chksum_stats_3d proc~rdb_debug_chksum_3d->proc~chksum_stats_3d proc~halo_allreduce_sum_i8 halo_allreduce_sum_i8 proc~chksum_row->proc~halo_allreduce_sum_i8 allreduce allreduce proc~halo_allreduce_sum_i8->allreduce proc~comm_env_compute_comm comm_env_compute_comm proc~halo_allreduce_sum_i8->proc~comm_env_compute_comm comm_world comm_world proc~comm_env_compute_comm->comm_world

Called by

proc~~rdb_debug_chksum_3d~~CalledByGraph proc~rdb_debug_chksum_3d rdb_debug_chksum_3d interface~rdb_debug_chksum rdb_debug_chksum interface~rdb_debug_chksum->proc~rdb_debug_chksum_3d proc~chksum_bt chksum_bt proc~chksum_bt->interface~rdb_debug_chksum proc~chksum_state chksum_state proc~chksum_state->interface~rdb_debug_chksum proc~ocean_dyn_step_split ocean_dyn_step_split proc~ocean_dyn_step_split->proc~chksum_state proc~run_stage_split run_stage_split proc~ocean_dyn_step_split->proc~run_stage_split proc~run_stage_split->proc~chksum_bt proc~run_stage_split->proc~chksum_state proc~engine_step engine_step proc~engine_step->proc~ocean_dyn_step_split proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~engine_step proc~rdb_ocean_step rdb_ocean_step proc~rdb_ocean_step->proc~engine_step

Variables

Type Visibility Attributes Name Initial
integer, private :: ia
integer, private :: ib
integer, private :: ja
integer, private :: jb
integer, private :: nx
integer, private :: ny
integer, private :: nz
type(chksum_stats_t), private :: st

Source Code

   subroutine rdb_debug_chksum_3d(grid, arr, label, field, stage, step, probe, loc)
      !! Location-aware 3D checksum: derives `(nx, ny)` from `grid` + `loc`
      !! and `nz` from the array, so a new instrumentation site is one
      !! line with no hand-written bounds.  Gated by the probe window.
      type(hgrid_t), intent(in) :: grid
      real(wp), intent(in) :: arr(:, :, :)
      ! assumed-shape-ok: no device loop here; forwards a contiguous
      ! actual to the explicit-shape chksum_stats_3d kernel.
      character(len=*), intent(in) :: label, field
      integer, intent(in) :: stage, step, loc
      type(chksum_probe_t), intent(inout) :: probe
      integer :: nx, ny, nz, ia, ib, ja, jb
      type(chksum_stats_t) :: st

      if (.not. chksum_active(probe, step)) return
      call chksum_loc_extents(grid, loc, nx, ny)
      nz = size(arr, 3)
      if (probe%interior) then
         call chksum_loc_interior(grid, loc, ia, ib, ja, jb)
         call chksum_stats_3d(arr, nx, ny, nz, st, ia, ib, ja, jb)
      else
         call chksum_stats_3d(arr, nx, ny, nz, st)
      end if
      call chksum_row(probe, label, stage, step, field, st)
   end subroutine rdb_debug_chksum_3d