test_accumulate_sub Subroutine

public subroutine test_accumulate_sub()

Arguments

None

Calls

proc~~test_accumulate_sub~~CallsGraph proc~test_accumulate_sub test_accumulate_sub assertequal assertequal proc~test_accumulate_sub->assertequal asserttrue asserttrue proc~test_accumulate_sub->asserttrue has_child has_child proc~test_accumulate_sub->has_child none~accumulate~5 BaseProfiler%accumulate proc~test_accumulate_sub->none~accumulate~5 none~finalize~14 BaseProfiler%finalize proc~test_accumulate_sub->none~finalize~14 none~get_num_meters BaseProfiler%get_num_meters proc~test_accumulate_sub->none~get_num_meters none~get_root_node BaseProfiler%get_root_node proc~test_accumulate_sub->none~get_root_node none~start~83 TimeProfiler%start proc~test_accumulate_sub->none~start~83 none~accumulate~5->none~get_root_node accumulate accumulate none~accumulate~5->accumulate none~back~42 MeterNodeStack%back none~accumulate~5->none~back~42 none~finalize~3 AbstractMeter%finalize none~finalize~14->none~finalize~3 none~get_meter MeterNode%get_meter none~finalize~14->none~get_meter none~pop_back~41 MeterNodeStack%pop_back none~finalize~14->none~pop_back~41 none~get_num_nodes MeterNode%get_num_nodes none~get_num_meters->none~get_num_nodes none~start_self BaseProfiler%start_self none~start~83->none~start_self mpi_op_free mpi_op_free none~finalize~3->mpi_op_free mpi_type_free mpi_type_free none~finalize~3->mpi_type_free proc~mapl_verify MAPL_Verify none~finalize~3->proc~mapl_verify get_num_nodes get_num_nodes none~get_num_nodes->get_num_nodes none~begin~103 MeterNodeVector%begin none~get_num_nodes->none~begin~103 none~get~202 MeterNodeVectorIterator%get none~get_num_nodes->none~get~202 none~next~108 MeterNodeVectorIterator%next none~get_num_nodes->none~next~108 interface~mapl_assert MAPL_Assert none~start_self->interface~mapl_assert none~get_name~5 MeterNode%get_name none~start_self->none~get_name~5 none~start~47 BaseProfiler%start none~start_self->none~start~47 proc~mapl_return MAPL_Return none~start_self->proc~mapl_return none~start~47->none~start_self at at proc~mapl_return->at insert insert proc~mapl_return->insert proc~mapl_throw_exception MAPL_throw_exception proc~mapl_return->proc~mapl_throw_exception proc~mapl_verify->proc~mapl_throw_exception

Source Code

   subroutine test_accumulate_sub()
      type(TimeProfiler), target :: main, lap
      class(AbstractMeterNode), pointer :: main_node

      main = TimeProfiler('main')
      call main%start()
      lap = TimeProfiler('lap')
      call lap%start()
      call lap%finalize()
      call main%accumulate(lap)

      ! should now have 'lap' as a subtimer of 'main'
      @assertEqual(2, main%get_num_meters())

      main_node => main%get_root_node()
      @assertTrue(main_node%has_child('lap'))
      
   end subroutine test_accumulate_sub