@@ -397,7 +397,6 @@ subroutine ocn_time_integrator_split(domain, dt)!{{{
397397
398398 call mpas_pool_get_subpool(domain % blocklist % structs, ' diagnostics' , diagnosticsPool)
399399
400- call mpas_threading_barrier()
401400 ! --- update halos for diagnostic ocean boundary layer depth
402401 if (config_use_cvmix_kpp) then
403402 call mpas_timer_start("se halo diag obd")
@@ -438,15 +437,12 @@ subroutine ocn_time_integrator_split(domain, dt)!{{{
438437 end do
439438 call mpas_timer_stop("se freq-filtered-thick computations")
440439
441- call mpas_threading_barrier()
442-
443440 call mpas_timer_start("se freq-filtered-thick halo update")
444441
445442 call mpas_dmpar_field_halo_exch(domain, ' tendHighFreqThickness' )
446443 call mpas_dmpar_field_halo_exch(domain, ' tendLowFreqDivergence' )
447444
448445 call mpas_timer_stop("se freq-filtered-thick halo update")
449- call mpas_threading_barrier()
450446
451447 block => domain % blocklist
452448 do while (associated(block))
@@ -609,8 +605,6 @@ subroutine ocn_time_integrator_split(domain, dt)!{{{
609605 block = > block % next
610606 end do
611607
612- call mpas_threading_barrier()
613-
614608 call mpas_timer_start(" se halo normalBaroclinicVelocity" )
615609 call mpas_dmpar_field_halo_exch(domain, ' normalBaroclinicVelocity' , timeLevel= 2 )
616610 call mpas_timer_stop(" se halo normalBaroclinicVelocity" )
@@ -761,21 +755,16 @@ subroutine ocn_time_integrator_split(domain, dt)!{{{
761755 edgeHaloComputeCounter = 0
762756 neededHalos = 1 + config_n_btr_cor_iter
763757
764- call mpas_threading_barrier()
765-
766758 call mpas_timer_start(' btr se subcycle loop' )
767759 do j = 1 , nBtrSubcycles * config_btr_subcycle_loop_factor
768760 if (cellHaloComputeCounter < neededHalos) then
769761
770- call mpas_threading_barrier()
771762 call mpas_timer_start(' se halo subcycle' )
772763 call mpas_dmpar_exch_group_reuse_halo_exch(domain, subcycleGroupName, timeLevel= oldBtrSubcycleTime)
773- call mpas_threading_barrier()
774764 call mpas_timer_stop(' se halo subcycle' )
775765
776766 cellHaloComputeCounter = config_num_halos - mod ( config_num_halos, neededHalos )
777767 edgeHaloComputeCounter = config_num_halos + 1 - mod ( config_num_halos, neededHalos )
778- call mpas_threading_barrier()
779768 end if
780769
781770 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -1235,7 +1224,6 @@ subroutine ocn_time_integrator_split(domain, dt)!{{{
12351224 end do ! j=1,nBtrSubcycles
12361225 call mpas_timer_stop(' btr se subcycle loop' )
12371226
1238- call mpas_threading_barrier()
12391227 call mpas_pool_get_subpool(domain % blocklist % structs, ' scratch' , scratchPool)
12401228 call mpas_pool_get_field(scratchPool, ' btrvel_temp' , btrvel_tempField)
12411229 call mpas_deallocate_scratch_field(btrvel_tempField, .false.)
@@ -1276,8 +1264,6 @@ subroutine ocn_time_integrator_split(domain, dt)!{{{
12761264 end do ! block
12771265 call mpas_timer_stop(' btr se norm' )
12781266
1279- call mpas_threading_barrier()
1280-
12811267 ! boundary update on F
12821268 call mpas_timer_start("se halo F and btr vel")
12831269 call mpas_dmpar_exch_group_create(domain, finalBtrGroupName)
@@ -1287,12 +1273,11 @@ subroutine ocn_time_integrator_split(domain, dt)!{{{
12871273
12881274 call mpas_threading_barrier()
12891275 call mpas_dmpar_exch_group_full_halo_exch(domain, finalBtrGroupName)
1276+ call mpas_threading_barrier()
12901277
12911278 call mpas_dmpar_exch_group_destroy(domain, finalBtrGroupName)
12921279 call mpas_timer_stop("se halo F and btr vel")
12931280
1294- call mpas_threading_barrier()
1295-
12961281 ! Check that you can compute SSH using the total sum or the individual increments
12971282 ! over the barotropic subcycles.
12981283 ! efficiency: This next block of code is really a check for debugging, and can
@@ -1443,17 +1428,13 @@ subroutine ocn_time_integrator_split(domain, dt)!{{{
14431428 end do
14441429 call mpas_timer_stop(' se thick tend' )
14451430
1446- call mpas_threading_barrier()
1447-
14481431 ! update halo for thickness tendencies
14491432 call mpas_timer_start("se halo thickness")
14501433
14511434 call mpas_dmpar_field_halo_exch(domain, ' tendLayerThickness' )
14521435
14531436 call mpas_timer_stop("se halo thickness")
14541437
1455- call mpas_threading_barrier()
1456-
14571438 call mpas_timer_start(' se tracer tend' , .false.)
14581439 block => domain % blocklist
14591440 do while (associated(block))
@@ -1473,8 +1454,6 @@ subroutine ocn_time_integrator_split(domain, dt)!{{{
14731454 end do
14741455 call mpas_timer_stop(' se tracer tend' )
14751456
1476- call mpas_threading_barrier()
1477-
14781457 ! update halo for tracer tendencies
14791458 call mpas_timer_start("se halo tracers")
14801459 call mpas_pool_get_subpool(domain % blocklist % structs, ' tend' , tendPool)
@@ -1491,8 +1470,6 @@ subroutine ocn_time_integrator_split(domain, dt)!{{{
14911470 end do
14921471 call mpas_timer_stop("se halo tracers")
14931472
1494- call mpas_threading_barrier()
1495-
14961473 call mpas_timer_start(' se loop fini' )
14971474 block => domain % blocklist
14981475 do while (associated(block))
@@ -1807,8 +1784,6 @@ subroutine ocn_time_integrator_split(domain, dt)!{{{
18071784 block => block % next
18081785 end do
18091786
1810- call mpas_threading_barrier()
1811-
18121787 ! Update halo on u and tracers, which were just updated for implicit vertical mixing. If not done,
18131788 ! this leads to lack of volume conservation. It is required because halo updates in stage 3 are only
18141789 ! conducted on tendencies, not on the velocity and tracer fields. So this update is required to
@@ -1832,8 +1807,6 @@ subroutine ocn_time_integrator_split(domain, dt)!{{{
18321807
18331808 call mpas_timer_stop("se implicit vert mix")
18341809
1835- call mpas_threading_barrier()
1836-
18371810 call mpas_timer_start(' se fini' )
18381811 block => domain % blocklist
18391812 do while (associated(block))
@@ -1930,7 +1903,6 @@ subroutine ocn_time_integrator_split(domain, dt)!{{{
19301903 !$omp end do
19311904
19321905 call ocn_time_average_coupled_accumulate(diagnosticsPool, statePool, forcingPool, 2 )
1933- call mpas_threading_barrier()
19341906
19351907 if (config_use_standardGM) then
19361908 call ocn_reconstruct_gm_vectors(diagnosticsPool, meshPool)
0 commit comments