Skip to content

Commit d7b2e32

Browse files
committed
Disable clock sync of in-loop BML timers
This patch overrides the default clock sync (configured in FMS) for the CPU clocks inside of the bulk mixed layer's loops. This prevents model hangs due to an inconsistent number of clock syncs when different ranks have different size domains.
1 parent 9341376 commit d7b2e32

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

src/parameterizations/vertical/MOM_bulk_mixed_layer.F90

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3628,15 +3628,21 @@ subroutine bulkmixedlayer_init(Time, G, GV, US, param_file, diag, CS)
36283628
if (CS%id_ML_depth > 0) call safe_alloc_alloc(CS%ML_depth, isd, ied, jsd, jed)
36293629

36303630
if (CS%allow_clocks_in_omp_loops) then
3631-
id_clock_detrain = cpu_clock_id('(Ocean mixed layer detrain)', grain=CLOCK_ROUTINE)
3632-
id_clock_mech = cpu_clock_id('(Ocean mixed layer mechanical entrainment)', grain=CLOCK_ROUTINE)
3633-
id_clock_conv = cpu_clock_id('(Ocean mixed layer convection)', grain=CLOCK_ROUTINE)
3631+
id_clock_detrain = cpu_clock_id('(Ocean mixed layer detrain)', &
3632+
sync=.false., grain=CLOCK_ROUTINE)
3633+
id_clock_mech = cpu_clock_id('(Ocean mixed layer mechanical entrainment)', &
3634+
sync=.false., grain=CLOCK_ROUTINE)
3635+
id_clock_conv = cpu_clock_id('(Ocean mixed layer convection)', &
3636+
sync=.false., grain=CLOCK_ROUTINE)
36343637
if (CS%ML_resort) then
3635-
id_clock_resort = cpu_clock_id('(Ocean mixed layer resorting)', grain=CLOCK_ROUTINE)
3638+
id_clock_resort = cpu_clock_id('(Ocean mixed layer resorting)', &
3639+
sync=.false., grain=CLOCK_ROUTINE)
36363640
else
3637-
id_clock_adjustment = cpu_clock_id('(Ocean mixed layer convective adjustment)', grain=CLOCK_ROUTINE)
3641+
id_clock_adjustment = cpu_clock_id('(Ocean mixed layer convective adjustment)', &
3642+
sync=.false., grain=CLOCK_ROUTINE)
36383643
endif
3639-
id_clock_EOS = cpu_clock_id('(Ocean mixed layer EOS)', grain=CLOCK_ROUTINE)
3644+
id_clock_EOS = cpu_clock_id('(Ocean mixed layer EOS)', &
3645+
sync=.false., grain=CLOCK_ROUTINE)
36403646
endif
36413647

36423648
if (CS%limit_det .or. (CS%id_Hsfc_min > 0)) &

0 commit comments

Comments
 (0)