Skip to content

Commit

Permalink
HOMME: minor GPTL timing related mods
Browse files Browse the repository at this point in the history
* Disable timing in prim_main for the first two teps
* Add some timers in EulerStepFunctor
  • Loading branch information
bartgol committed Sep 5, 2024
1 parent 9d81423 commit df31c59
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 6 additions & 1 deletion components/homme/src/prim_main.F90
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ program prim_main
use element_mod, only: element_t
use common_io_mod, only: output_dir, infilenames
use common_movie_mod, only: nextoutputstep
use perf_mod, only: t_initf, t_prf, t_finalizef, t_startf, t_stopf ! _EXTERNAL
use perf_mod, only: t_initf, t_prf, t_finalizef, t_startf, t_stopf, t_disablef, t_enablef ! _EXTERNAL
use restart_io_mod , only: restartheader_t, writerestart
use hybrid_mod, only: hybrid_create
#if (defined MODEL_THETA_L && defined ARKODE)
Expand Down Expand Up @@ -240,6 +240,11 @@ end subroutine finalize_kokkos_f90

nstep = nextoutputstep(tl)
do while(tl%nstep<nstep)

if(tl%nstep < 2) then
call t_disablef()
endif
if(tl%nstep >= 2) call t_enablef()
call t_startf('prim_run')
call prim_run_subcycle(elem, hybrid,nets,nete, tstep, .false., tl, hvcoord,1)
call t_stopf('prim_run')
Expand Down
5 changes: 5 additions & 0 deletions components/homme/src/share/cxx/EulerStepFunctorImpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,10 @@ class EulerStepFunctorImpl {
minmax_and_biharmonic();
}
}

GPTLstart("tl-at adv-n-limit");
advect_and_limit();
GPTLstop("tl-at adv-n-limit");
exchange_qdp_dss_var();
}

Expand All @@ -667,13 +670,15 @@ class EulerStepFunctorImpl {
void run_tracer_phase (const KernelVariables& kv) const {
compute_qtens(kv);
kv.team_barrier();

if (m_data.limiter_option == 8) {
limiter_optim_iter_full(kv);
kv.team_barrier();
} else if (m_data.limiter_option == 9) {
limiter_clip_and_sum(kv);
kv.team_barrier();
}

apply_spheremp(kv);
}

Expand Down

0 comments on commit df31c59

Please sign in to comment.