tem_getSumTimerVal Function

public function tem_getSumTimerVal(me, timerHandle, comm) result(retValue)

Get the sum of timer durations across all partitions.

Note

This assumes the same timerhandle to be used across all partitions for all timers.

Arguments

Type IntentOptional Attributes Name
type(tem_timer_type), intent(inout), optional :: me

timer object

integer, intent(in) :: timerHandle

timer handle

integer, intent(in) :: comm

communicator handle

Return Value real(kind=rk)

timer value


Calls

proc~~tem_getsumtimerval~~CallsGraph proc~tem_getsumtimerval tem_getSumTimerVal mpi_allreduce mpi_allreduce proc~tem_getsumtimerval->mpi_allreduce proc~tem_gettimerval tem_getTimerVal proc~tem_getsumtimerval->proc~tem_gettimerval proc~tem_stoptimer tem_stopTimer proc~tem_gettimerval->proc~tem_stoptimer mpi_wtime mpi_wtime proc~tem_stoptimer->mpi_wtime

Called by

proc~~tem_getsumtimerval~~CalledByGraph proc~tem_getsumtimerval tem_getSumTimerVal proc~tem_timer_dumplabeled tem_timer_dumplabeled proc~tem_timer_dumplabeled->proc~tem_getsumtimerval proc~tem_timer_dump_glob tem_timer_dump_glob proc~tem_timer_dump_glob->proc~tem_timer_dumplabeled proc~tem_finalize tem_finalize proc~tem_finalize->proc~tem_timer_dump_glob

Source Code

  function tem_getSumTimerVal( me, timerHandle, comm ) result( retValue )
    ! -------------------------------------------------------------------- !
    !> timer object
    type(tem_timer_type), intent(inout), optional :: me
    !> timer handle
    integer, intent(in) :: timerHandle
    !> communicator handle
    integer, intent(in) :: comm
    !> timer value
    real(kind=rk) :: retValue
    ! -------------------------------------------------------------------- !
    real(kind=rk) :: send, recv
    integer :: iError
    ! -------------------------------------------------------------------- !

    send = tem_getTimerVal( me = me, timerHandle = timerHandle )

    call MPI_Allreduce( send, recv, 1, rk_mpi, MPI_SUM, comm, iError )

    retValue = recv

  end function tem_getSumTimerVal