Skip to content

Commit 0573e5c

Browse files
committed
Standardize timing ranges
1 parent cbaa91c commit 0573e5c

File tree

3 files changed

+33
-12
lines changed

3 files changed

+33
-12
lines changed

src/common/m_mpi_common.fpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ module m_mpi_common
1616
use m_derived_types !< Definitions of the derived types
1717
1818
use m_global_parameters !< Definitions of the global parameters
19+
20+
use m_nvtx
1921
! ==========================================================================
2022
2123
implicit none
@@ -239,6 +241,7 @@ contains
239241
#ifdef MFC_SIMULATION
240242
#ifdef MFC_MPI
241243
244+
call nvtxStartRange("TSTEP-RUNTIME-INFO-REDUCE-CRIT")
242245
! Reducing local extrema of ICFL, VCFL, CCFL and Rc numbers to their
243246
! global extrema and bookkeeping the results on the rank 0 processor
244247
call MPI_REDUCE(icfl_max_loc, icfl_max_glb, 1, &
@@ -253,6 +256,7 @@ contains
253256
MPI_DOUBLE_PRECISION, MPI_MIN, 0, &
254257
MPI_COMM_WORLD, ierr)
255258
end if
259+
call nvtxEndRange
256260
257261
#else
258262

src/simulation/m_mpi_proxy.fpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,6 @@ contains
10781078
call nvtxStartRange("RHS-COMM-SENDRECV-NO-RMDA")
10791079
#:endif
10801080
1081-
call nvtxStartRange("RHS-MPI-SENDRECV")
10821081
call MPI_SENDRECV( &
10831082
p_send, buffer_count, MPI_DOUBLE_PRECISION, dst_proc, send_tag, &
10841083
p_recv, buffer_count, MPI_DOUBLE_PRECISION, src_proc, recv_tag, &

src/simulation/m_rhs.fpp

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ contains
682682
gm_alpha_qp%vf)
683683
call nvtxEndRange
684684

685-
call nvtxStartRange("RHS-COMM")
685+
call nvtxStartRange("RHS-COMMUNICATION")
686686
call s_populate_variables_buffers(q_prim_qp%vf, pb, mv)
687687
call nvtxEndRange
688688

@@ -866,6 +866,26 @@ contains
866866
end if
867867
! END: Additional physics and source terms =========================
868868

869+
#:if chemistry
870+
if (chem_params%advection) then
871+
call nvtxStartRange("RHS-CHEM-ADVECTION")
872+
873+
#:for NORM_DIR, XYZ in [(1, 'x'), (2, 'y'), (3, 'z')]
874+
875+
if (id == ${NORM_DIR}$) then
876+
call s_compute_chemistry_rhs_${XYZ}$ ( &
877+
flux_n, &
878+
rhs_vf, &
879+
flux_src_n(${NORM_DIR}$)%vf, &
880+
q_prim_vf)
881+
end if
882+
883+
#:endfor
884+
885+
call nvtxEndRange
886+
end if
887+
#:endif
888+
869889
end do
870890
! END: Dimensional Splitting Loop =================================
871891

@@ -902,20 +922,18 @@ contains
902922
end if
903923

904924
! Add bubles source term
905-
if (bubbles .and. (.not. adap_dt) .and. (.not. qbmm)) then
906-
call nvtxStartRange("RHS-BUBBLES-SOURCE")
907-
call s_compute_bubble_source( &
908-
q_cons_qp%vf(1:sys_size), &
909-
q_prim_qp%vf(1:sys_size), &
910-
t_step, &
911-
rhs_vf)
912-
call nvtxEndRange
913-
end if
925+
call nvtxStartRange("RHS-BUBBLES-SRC")
926+
if (bubbles .and. (.not. adap_dt) .and. (.not. qbmm)) call s_compute_bubble_source( &
927+
q_cons_qp%vf(1:sys_size), &
928+
q_prim_qp%vf(1:sys_size), &
929+
t_step, &
930+
rhs_vf)
931+
call nvtxEndRange
914932

915933
if (chemistry) then
916934
if (chem_params%reactions) then
917935
call nvtxStartRange("RHS-CHEM-REACTIONS")
918-
call s_compute_chemistry_reaction_flux(rhs_vf, q_cons_qp%vf, q_prim_qp%vf)
936+
call s_compute_chemistry_reaction_flux(rhs_vf, q_cons_vf, q_prim_qp%vf)
919937
call nvtxEndRange
920938
end if
921939
end if

0 commit comments

Comments
 (0)