test_stop_wrong_meter Subroutine

public subroutine test_stop_wrong_meter()

Arguments

None

Calls

proc~~test_stop_wrong_meter~~CallsGraph proc~test_stop_wrong_meter test_TimeProfiler::test_stop_wrong_meter assertequal assertequal proc~test_stop_wrong_meter->assertequal assertexceptionraised assertexceptionraised proc~test_stop_wrong_meter->assertexceptionraised none~finalize mapl_BaseProfiler::BaseProfiler%finalize proc~test_stop_wrong_meter->none~finalize none~get_status mapl_BaseProfiler::BaseProfiler%get_status proc~test_stop_wrong_meter->none~get_status none~start mapl_TimeProfiler_private::TimeProfiler%start proc~test_stop_wrong_meter->none~start none~finalize~2 MAPL_AbstractMeter::AbstractMeter%finalize none~finalize->none~finalize~2 none~get_meter MAPL_MeterNode::MeterNode%get_meter none~finalize->none~get_meter none~pop_back mapl_MeterNodeStack::MeterNodeStack%pop_back none~finalize->none~pop_back none~start_self mapl_BaseProfiler::BaseProfiler%start_self none~start->none~start_self mpi_op_free mpi_op_free none~finalize~2->mpi_op_free mpi_type_free mpi_type_free none~finalize~2->mpi_type_free interface~mapl_assert MAPL_ErrorHandlingMod::MAPL_Assert none~start_self->interface~mapl_assert none~get_name MAPL_MeterNode::MeterNode%get_name none~start_self->none~get_name none~start~2 mapl_BaseProfiler::BaseProfiler%start none~start_self->none~start~2 proc~mapl_return MAPL_ErrorHandlingMod::MAPL_Return none~start_self->proc~mapl_return none~start~2->none~start_self at at proc~mapl_return->at insert insert proc~mapl_return->insert proc~mapl_throw_exception MAPL_ThrowMod::MAPL_throw_exception proc~mapl_return->proc~mapl_throw_exception

Source Code

   subroutine test_stop_wrong_meter()
      type (TimeProfiler), target :: prof
      integer :: status
      
      prof = TimeProfiler('top')
      call prof%start()

      call prof%start('timer_1')
      call prof%start('timer_2')
      @assertEqual(0, prof%get_status())
      call prof%stop('timer_1', rc=status) ! not the current timer

!C$      @assertEqual(INCORRECTLY_NESTED_METERS, prof%get_status())
      @assertExceptionRaised('Timer <timer_1> does not match start timer <timer_2>')
      call prof%finalize()
      
   end subroutine test_stop_wrong_meter