record_edge Subroutine

private subroutine record_edge(parent, child, elapsed)

Updates the call tree edge statistics between two timers.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: parent

Index of the calling timer.

integer, intent(in) :: child

Index of the called timer.

real(kind=rk), intent(in) :: elapsed

Wall time spent in this call.


Called by

proc~~record_edge~~CalledByGraph proc~record_edge mod_profiler::record_edge proc~profiler_stop mod_profiler::profiler_stop proc~profiler_stop->proc~record_edge proc~advance_energy_transport mod_energy::advance_energy_transport proc~advance_energy_transport->proc~profiler_stop proc~flow_exchange_cell_scalar mod_mpi_flow::flow_exchange_cell_scalar proc~advance_energy_transport->proc~flow_exchange_cell_scalar proc~advance_projection_step mod_flow_projection::advance_projection_step proc~advance_projection_step->proc~profiler_stop proc~balance_neumann_outlet_flux mod_flow_projection::balance_neumann_outlet_flux proc~advance_projection_step->proc~balance_neumann_outlet_flux proc~flow_exchange_cell_matrix mod_mpi_flow::flow_exchange_cell_matrix proc~advance_projection_step->proc~flow_exchange_cell_matrix proc~advance_projection_step->proc~flow_exchange_cell_scalar proc~flow_exchange_face_scalar mod_mpi_flow::flow_exchange_face_scalar proc~advance_projection_step->proc~flow_exchange_face_scalar proc~compute_flow_diagnostics mod_flow_projection::compute_flow_diagnostics proc~advance_projection_step->proc~compute_flow_diagnostics proc~solve_pressure_correction mod_flow_projection::solve_pressure_correction proc~advance_projection_step->proc~solve_pressure_correction proc~balance_neumann_outlet_flux->proc~profiler_stop proc~flow_allgather_owned_matrix mod_mpi_flow::flow_allgather_owned_matrix proc~flow_allgather_owned_matrix->proc~profiler_stop proc~flow_allgather_owned_matrix_inplace mod_mpi_flow::flow_allgather_owned_matrix_inplace proc~flow_allgather_owned_matrix_inplace->proc~profiler_stop proc~flow_allgather_owned_scalar mod_mpi_flow::flow_allgather_owned_scalar proc~flow_allgather_owned_scalar->proc~profiler_stop proc~flow_allgather_owned_v4 mod_mpi_flow::flow_allgather_owned_v4 proc~flow_allgather_owned_v4->proc~profiler_stop proc~flow_allreduce_global_scalar mod_mpi_flow::flow_allreduce_global_scalar proc~flow_allreduce_global_scalar->proc~profiler_stop proc~flow_allreduce_global_vector mod_mpi_flow::flow_allreduce_global_vector proc~flow_allreduce_global_vector->proc~profiler_stop proc~flow_exchange_cell_matrix->proc~profiler_stop proc~flow_exchange_cell_scalar->proc~profiler_stop proc~flow_exchange_face_scalar->proc~profiler_stop proc~flow_gather_owned_matrix_root mod_mpi_flow::flow_gather_owned_matrix_root proc~flow_gather_owned_matrix_root->proc~profiler_stop proc~flow_gather_owned_scalar_root mod_mpi_flow::flow_gather_owned_scalar_root proc~flow_gather_owned_scalar_root->proc~profiler_stop proc~flow_global_dot_owned mod_mpi_flow::flow_global_dot_owned proc~flow_global_dot_owned->proc~profiler_stop proc~flow_global_dots_owned mod_mpi_flow::flow_global_dots_owned proc~flow_global_dots_owned->proc~profiler_stop proc~flow_global_max_owned mod_mpi_flow::flow_global_max_owned proc~flow_global_max_owned->proc~profiler_stop proc~flow_global_sum_owned mod_mpi_flow::flow_global_sum_owned proc~flow_global_sum_owned->proc~profiler_stop proc~flow_global_two_dots_owned mod_mpi_flow::flow_global_two_dots_owned proc~flow_global_two_dots_owned->proc~profiler_stop proc~pressure_matvec mod_flow_projection::pressure_matvec proc~pressure_matvec->proc~profiler_stop proc~update_transport_properties mod_transport_properties::update_transport_properties proc~update_transport_properties->proc~profiler_stop proc~update_transport_properties->proc~flow_exchange_cell_matrix proc~update_transport_properties->proc~flow_exchange_cell_scalar program~lowmach_react_hex lowmach_react_hex program~lowmach_react_hex->proc~profiler_stop program~lowmach_react_hex->proc~advance_energy_transport program~lowmach_react_hex->proc~advance_projection_step program~lowmach_react_hex->proc~update_transport_properties proc~advance_species_transport mod_species::advance_species_transport program~lowmach_react_hex->proc~advance_species_transport program~lowmach_react_hex->proc~compute_flow_diagnostics proc~advance_species_transport->proc~flow_exchange_cell_matrix proc~compute_flow_diagnostics->proc~flow_global_max_owned proc~flow_allgather_owned_vector mod_mpi_flow::flow_allgather_owned_vector proc~flow_allgather_owned_vector->proc~flow_allgather_owned_matrix proc~solve_pressure_correction->proc~flow_exchange_cell_scalar proc~solve_pressure_correction->proc~flow_global_dot_owned proc~solve_pressure_correction->proc~flow_global_two_dots_owned proc~solve_pressure_correction->proc~pressure_matvec

Source Code

   subroutine record_edge(parent, child, elapsed)
      integer, intent(in) :: parent
      integer, intent(in) :: child
      real(rk), intent(in) :: elapsed

      integer :: e

      do e = 1, nedges
         if (edges(e)%parent == parent .and. edges(e)%child == child) then
            edges(e)%calls = edges(e)%calls + 1
            edges(e)%total_time = edges(e)%total_time + elapsed
            return
         end if
      end do

      if (nedges >= MAX_EDGES) then
         write(error_unit,'(a)') 'profiler: MAX_EDGES exceeded'
         error stop 1
      end if

      nedges = nedges + 1
      edges(nedges)%parent = parent
      edges(nedges)%child = child
      edges(nedges)%calls = 1
      edges(nedges)%total_time = elapsed
   end subroutine record_edge