find_or_create_timer Function

private function find_or_create_timer(name) result(idx)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

Return Value integer


Called by

proc~~find_or_create_timer~~CalledByGraph proc~find_or_create_timer mod_profiler::find_or_create_timer proc~profiler_start mod_profiler::profiler_start proc~profiler_start->proc~find_or_create_timer proc~profiler_stop mod_profiler::profiler_stop proc~profiler_stop->proc~find_or_create_timer proc~advance_energy_transport mod_energy::advance_energy_transport proc~advance_energy_transport->proc~profiler_start 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_start 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_start 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_start 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_start 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_start 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_start 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_start 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_start proc~flow_allreduce_global_vector->proc~profiler_stop proc~flow_exchange_cell_matrix->proc~profiler_start proc~flow_exchange_cell_matrix->proc~profiler_stop proc~flow_exchange_cell_scalar->proc~profiler_start proc~flow_exchange_cell_scalar->proc~profiler_stop proc~flow_exchange_face_scalar->proc~profiler_start 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_start 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_start 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_start 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_start 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_start 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_start 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_start proc~flow_global_two_dots_owned->proc~profiler_stop proc~pressure_matvec mod_flow_projection::pressure_matvec proc~pressure_matvec->proc~profiler_start proc~pressure_matvec->proc~profiler_stop proc~update_transport_properties mod_transport_properties::update_transport_properties proc~update_transport_properties->proc~profiler_start 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_start 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

   integer function find_or_create_timer(name) result(idx)
      character(len=*), intent(in) :: name
      integer :: i

      do i = 1, ntimers
         if (trim(timers(i)%name) == trim(name)) then
            idx = i
            return
         end if
      end do

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

      ntimers = ntimers + 1
      timers(ntimers)%name = trim(name)
      timers(ntimers)%calls = 0
      timers(ntimers)%total_time = 0.0_rk

      idx = ntimers
   end function find_or_create_timer