do_lap Subroutine

subroutine do_lap(prof)

Arguments

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

Calls

proc~~do_lap~~CallsGraph proc~do_lap do_lap none~start~84 TimeProfiler%start proc~do_lap->none~start~84 none~start_self~2 StubProfiler%start_self none~start~84->none~start_self~2 proc~mapl_return MAPL_Return none~start_self~2->proc~mapl_return 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

Called by

proc~~do_lap~~CalledByGraph proc~do_lap do_lap program~main~11 main program~main~11->proc~do_lap

Source Code

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

      real, pointer :: x(:)

      allocate(x(10**7))
      call random_number(x)
      print*,sum(x)
      call prof%start('timer_1') ! 2
      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
      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