Skip to content

Commit 132b3a5

Browse files
oksanagubabartgol
authored andcommitted
HOMME: minor GPTL timing related mods
* Disable timing in prim_main for the first two teps * Add some timers in EulerStepFunctor
1 parent 5a43946 commit 132b3a5

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

components/homme/src/prim_main.F90

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ program prim_main
2020
use element_mod, only: element_t
2121
use common_io_mod, only: output_dir, infilenames
2222
use common_movie_mod, only: nextoutputstep
23-
use perf_mod, only: t_initf, t_prf, t_finalizef, t_startf, t_stopf ! _EXTERNAL
23+
use perf_mod, only: t_initf, t_prf, t_finalizef, t_startf, t_stopf, t_disablef, t_enablef ! _EXTERNAL
2424
use restart_io_mod , only: restartheader_t, writerestart
2525
use hybrid_mod, only: hybrid_create
2626
#if (defined MODEL_THETA_L && defined ARKODE)
@@ -240,6 +240,11 @@ end subroutine finalize_kokkos_f90
240240

241241
nstep = nextoutputstep(tl)
242242
do while(tl%nstep<nstep)
243+
244+
if(tl%nstep < 2) then
245+
call t_disablef()
246+
endif
247+
if(tl%nstep >= 2) call t_enablef()
243248
call t_startf('prim_run')
244249
call prim_run_subcycle(elem, hybrid,nets,nete, tstep, .false., tl, hvcoord,1)
245250
call t_stopf('prim_run')

components/homme/src/share/cxx/EulerStepFunctorImpl.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,10 @@ class EulerStepFunctorImpl {
652652
minmax_and_biharmonic();
653653
}
654654
}
655+
656+
GPTLstart("tl-at adv-n-limit");
655657
advect_and_limit();
658+
GPTLstop("tl-at adv-n-limit");
656659
exchange_qdp_dss_var();
657660
}
658661

@@ -667,13 +670,15 @@ class EulerStepFunctorImpl {
667670
void run_tracer_phase (const KernelVariables& kv) const {
668671
compute_qtens(kv);
669672
kv.team_barrier();
673+
670674
if (m_data.limiter_option == 8) {
671675
limiter_optim_iter_full(kv);
672676
kv.team_barrier();
673677
} else if (m_data.limiter_option == 9) {
674678
limiter_clip_and_sum(kv);
675679
kv.team_barrier();
676680
}
681+
677682
apply_spheremp(kv);
678683
}
679684

0 commit comments

Comments
 (0)