tem_getMinTimerVal Function

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

Get the minimum timer duration 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


Source Code

  function tem_getMinTimerVal( 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_MIN, comm, iError )

    retValue = recv

  end function tem_getMinTimerVal