resolve_bt_halo Function

public pure function resolve_bt_halo(requested, compute_size, exclusion_active) result(width)

Resolve the &ocean_bt_nml bt_halo sentinel to a concrete march-in width. requested == BT_HALO_AUTO_SENTINEL (-1, the default) => AUTO: 0. The march-in used to switch itself on (BT_HALO_AUTO_WIDTH) on every compatible multi-rank run. It is not bit-reproducible against the serial run over variable bathymetry or with open boundaries (test_ocean_decomp_bitid_mpi), so a default multi-rank run must not pick it: AUTO is off, serial or not. requested >= 0 (user set it explicitly) => returned UNCHANGED; the fail-loud exclusion checks in validate_config police an explicit bt_halo > 0 against an incompatible feature (user asked for the impossible), so the auto-resolution never overrides an explicit 0 or an explicit width. compute_size / exclusion_active no longer change the answer; they stay so the call site (and its exclusion log) keeps its shape for the day the march-in is exact again.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: requested

The namelist value: BT_HALO_AUTO_SENTINEL (-1) for auto, else >= 0.

integer, intent(in) :: compute_size

Number of compute ranks (1 = serial). Unused by AUTO (see above).

logical, intent(in) :: exclusion_active

.true. iff any march-in exclusion feature is on (see bt_halo_auto_exclusion). Unused by AUTO (see above).

Return Value integer


Called by

proc~~resolve_bt_halo~~CalledByGraph proc~resolve_bt_halo resolve_bt_halo proc~engine_setup engine_setup proc~engine_setup->proc~resolve_bt_halo proc~complete_ocean_create complete_ocean_create proc~complete_ocean_create->proc~engine_setup proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~engine_setup proc~driver_validate driver_validate proc~driver_validate->proc~engine_setup proc~driver_run driver_run proc~driver_run->proc~driver_run_ocean proc~rdb_ocean_create_finalize rdb_ocean_create_finalize proc~rdb_ocean_create_finalize->proc~complete_ocean_create proc~rdb_ocean_create_from_string rdb_ocean_create_from_string proc~rdb_ocean_create_from_string->proc~complete_ocean_create

Source Code

   pure function resolve_bt_halo(requested, compute_size, exclusion_active) result(width)
      !! Resolve the `&ocean_bt_nml bt_halo` sentinel to a concrete march-in
      !! width.
      !!   requested == BT_HALO_AUTO_SENTINEL (-1, the default) => AUTO: 0.
      !!     The march-in used to switch itself on (BT_HALO_AUTO_WIDTH) on
      !!     every compatible multi-rank run.  It is not bit-reproducible
      !!     against the serial run over variable bathymetry or with open
      !!     boundaries (`test_ocean_decomp_bitid_mpi`), so a default
      !!     multi-rank run must not pick it: AUTO is off, serial or not.
      !!   requested >= 0 (user set it explicitly) => returned UNCHANGED; the
      !!     fail-loud exclusion checks in validate_config police an explicit
      !!     bt_halo > 0 against an incompatible feature (user asked for the
      !!     impossible), so the auto-resolution never overrides an explicit 0
      !!     or an explicit width.
      !! `compute_size` / `exclusion_active` no longer change the answer; they
      !! stay so the call site (and its exclusion log) keeps its shape for the
      !! day the march-in is exact again.
      integer, intent(in) :: requested
         !! The namelist value: BT_HALO_AUTO_SENTINEL (-1) for auto, else >= 0.
      integer, intent(in) :: compute_size
         !! Number of compute ranks (1 = serial).  Unused by AUTO (see above).
      logical, intent(in) :: exclusion_active
         !! .true. iff any march-in exclusion feature is on (see
         !! `bt_halo_auto_exclusion`).  Unused by AUTO (see above).
      integer :: width
      width = 0
      if (requested >= 0) width = requested
      if (compute_size < 0 .and. exclusion_active) width = 0   ! never taken; keeps the dummies referenced
   end function resolve_bt_halo