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.
| Type | Intent | Optional | 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
|
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