do_lap Subroutine

subroutine do_lap(prof)

Arguments

Type IntentOptional Attributes Name
type(DistributedProfiler), target :: prof

Calls

proc~~do_lap~2~~CallsGraph proc~do_lap~2 main::do_lap none~start~3 MAPL_DistributedProfiler::DistributedProfiler%start proc~do_lap~2->none~start~3 none~start_self mapl_BaseProfiler::BaseProfiler%start_self none~start~3->none~start_self 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

Called by

proc~~do_lap~2~~CalledByGraph proc~do_lap~2 main::do_lap program~main~16 main program~main~16->proc~do_lap~2

Source Code

   subroutine do_lap(prof)
      type (DistributedProfiler), target :: prof

      real, pointer :: x(:)

      call prof%start('timer_1') ! 2
      allocate(x(10**7 * rank))
      call random_number(x)
      print*,sum(x)
      call prof%start('timer_1a')! 3
      call prof%stop('timer_1a')
      call prof%start('timer_1b') ! 4
      call prof%start('timer_1b1') ! 5
      call prof%stop('timer_1b1')
      call prof%stop('timer_1b')
      call prof%stop('timer_1')
      call prof%start('timer_2') ! 6
      call prof%start('timer_2b')! 7
      call prof%stop('timer_2b')
      call prof%stop('timer_2')

      call prof%start('timer_1') ! 2
      block
        real, allocatable :: x(:)
        allocate(x(1000000))
        call random_number(x)
        print*,'sum: ', sum(exp(x))
        deallocate(x)
      end block
      call prof%start('timer_1a')! 3
      call prof%stop('timer_1a')
      call prof%stop('timer_1')

      call prof%start('timer_2') ! 6
      call prof%stop('timer_2')
      call prof%start('timer_2') ! 6
      call prof%stop('timer_2')
   end subroutine do_lap