chksum_row Subroutine

private subroutine chksum_row(probe, label, stage, step, field, stats)

Emit one CHKSUM row (write(*,…) like the KE_ATTR probe — probe output bypasses the logger by design: greppable, no prefix, survives logger-level filtering).

Arguments

Type IntentOptional Attributes Name
type(chksum_probe_t), intent(inout) :: probe
character(len=*), intent(in) :: label
integer, intent(in) :: stage
integer, intent(in) :: step
character(len=*), intent(in) :: field
type(chksum_stats_t), intent(in) :: stats

Calls

proc~~chksum_row~~CallsGraph proc~chksum_row chksum_row 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~~chksum_row~~CalledByGraph proc~chksum_row chksum_row proc~rdb_debug_chksum_2d rdb_debug_chksum_2d proc~rdb_debug_chksum_2d->proc~chksum_row proc~rdb_debug_chksum_3d rdb_debug_chksum_3d proc~rdb_debug_chksum_3d->proc~chksum_row interface~rdb_debug_chksum rdb_debug_chksum interface~rdb_debug_chksum->proc~rdb_debug_chksum_2d 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

Variables

Type Visibility Attributes Name Initial
integer(kind=int64), private :: bits_global

Source Code

   subroutine chksum_row(probe, label, stage, step, field, stats)
      !! Emit one CHKSUM row (write(*,...) like the KE_ATTR probe —
      !! probe output bypasses the logger by design: greppable, no
      !! prefix, survives logger-level filtering).
      type(chksum_probe_t), intent(inout) :: probe
      character(len=*), intent(in) :: label, field
      integer, intent(in) :: stage, step
      type(chksum_stats_t), intent(in) :: stats
      integer(int64) :: bits_global

      if (.not. probe%header_done) then
         write (*, "(a)") "# CHKSUM columns: step stage phase field "// &
            "sum min max nonfin bits"
         write (*, "(a)") "# nonfin > 0 = the phase just run minted non-finite values"
         write (*, "(a)") "# bits = decomposition-invariant POPCNT reduction "// &
            "(sum/min/max are per-rank)"
         probe%header_done = .true.
      end if
      ! `bits` is the ONLY column reduced across ranks — its whole purpose
      ! is being identical on 1 rank vs N.  sum/min/max stay per-rank
      ! (documented).  Single-rank ⇒ the facade wrapper is an identity copy.
      call halo_allreduce_sum_i8(stats%bits, bits_global)
      write (*, "(a,1x,i6,1x,a,i1,1x,a16,1x,a12,3(1x,es20.12),1x,i9,1x,i20)") &
         "CHKSUM", step, "s", stage, adjustl(label), adjustl(field), &
         stats%total, stats%minv, stats%maxv, stats%nonfin, bits_global
   end subroutine chksum_row