Skip to content

Commit

Permalink
Standardize timing ranges
Browse files Browse the repository at this point in the history
  • Loading branch information
max-Hawkins committed Nov 11, 2024
1 parent cbaa91c commit 0573e5c
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 12 deletions.
4 changes: 4 additions & 0 deletions src/common/m_mpi_common.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ module m_mpi_common
use m_derived_types !< Definitions of the derived types
use m_global_parameters !< Definitions of the global parameters
use m_nvtx
! ==========================================================================
implicit none
Expand Down Expand Up @@ -239,6 +241,7 @@ contains
#ifdef MFC_SIMULATION
#ifdef MFC_MPI
call nvtxStartRange("TSTEP-RUNTIME-INFO-REDUCE-CRIT")
! Reducing local extrema of ICFL, VCFL, CCFL and Rc numbers to their
! global extrema and bookkeeping the results on the rank 0 processor
call MPI_REDUCE(icfl_max_loc, icfl_max_glb, 1, &
Expand All @@ -253,6 +256,7 @@ contains
MPI_DOUBLE_PRECISION, MPI_MIN, 0, &
MPI_COMM_WORLD, ierr)
end if
call nvtxEndRange
#else
Expand Down
1 change: 0 additions & 1 deletion src/simulation/m_mpi_proxy.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,6 @@ contains
call nvtxStartRange("RHS-COMM-SENDRECV-NO-RMDA")
#:endif
call nvtxStartRange("RHS-MPI-SENDRECV")
call MPI_SENDRECV( &
p_send, buffer_count, MPI_DOUBLE_PRECISION, dst_proc, send_tag, &
p_recv, buffer_count, MPI_DOUBLE_PRECISION, src_proc, recv_tag, &
Expand Down
40 changes: 29 additions & 11 deletions src/simulation/m_rhs.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ contains
gm_alpha_qp%vf)
call nvtxEndRange

call nvtxStartRange("RHS-COMM")
call nvtxStartRange("RHS-COMMUNICATION")
call s_populate_variables_buffers(q_prim_qp%vf, pb, mv)
call nvtxEndRange

Expand Down Expand Up @@ -866,6 +866,26 @@ contains
end if
! END: Additional physics and source terms =========================

#:if chemistry
if (chem_params%advection) then
call nvtxStartRange("RHS-CHEM-ADVECTION")

#:for NORM_DIR, XYZ in [(1, 'x'), (2, 'y'), (3, 'z')]

if (id == ${NORM_DIR}$) then
call s_compute_chemistry_rhs_${XYZ}$ ( &
flux_n, &
rhs_vf, &
flux_src_n(${NORM_DIR}$)%vf, &
q_prim_vf)
end if

#:endfor

call nvtxEndRange
end if
#:endif

end do
! END: Dimensional Splitting Loop =================================

Expand Down Expand Up @@ -902,20 +922,18 @@ contains
end if

! Add bubles source term
if (bubbles .and. (.not. adap_dt) .and. (.not. qbmm)) then
call nvtxStartRange("RHS-BUBBLES-SOURCE")
call s_compute_bubble_source( &
q_cons_qp%vf(1:sys_size), &
q_prim_qp%vf(1:sys_size), &
t_step, &
rhs_vf)
call nvtxEndRange
end if
call nvtxStartRange("RHS-BUBBLES-SRC")
if (bubbles .and. (.not. adap_dt) .and. (.not. qbmm)) call s_compute_bubble_source( &
q_cons_qp%vf(1:sys_size), &
q_prim_qp%vf(1:sys_size), &
t_step, &
rhs_vf)
call nvtxEndRange

if (chemistry) then
if (chem_params%reactions) then
call nvtxStartRange("RHS-CHEM-REACTIONS")
call s_compute_chemistry_reaction_flux(rhs_vf, q_cons_qp%vf, q_prim_qp%vf)
call s_compute_chemistry_reaction_flux(rhs_vf, q_cons_vf, q_prim_qp%vf)
call nvtxEndRange
end if
end if
Expand Down

0 comments on commit 0573e5c

Please sign in to comment.