Merge branch 'master' into reconnection

This commit is contained in:
Grzegorz Kowal 2014-01-03 13:47:32 -02:00
commit b83d464c7f
8 changed files with 56 additions and 36 deletions

View File

@ -181,10 +181,10 @@ module equations
#ifdef PROFILE
! set timer descriptions
!
call set_timer('equations initialization', imi)
call set_timer('variable conversion' , imc)
call set_timer('flux calculation' , imf)
call set_timer('maximum speed estimation', imm)
call set_timer('equations:: initialization' , imi)
call set_timer('equations:: variable conversion', imc)
call set_timer('equations:: flux calculation' , imf)
call set_timer('equations:: speed estimation' , imm)
! start accounting time for module initialization/finalization
!

View File

@ -114,9 +114,9 @@ module interpolations
#ifdef PROFILE
! set timer descriptions
!
call set_timer('interpolation initialization', imi)
call set_timer('reconstruction' , imr)
call set_timer('fix positivity' , imf)
call set_timer('interpolations:: initialization', imi)
call set_timer('interpolations:: reconstruction', imr)
call set_timer('interpolations:: fix positivity', imf)
! start accounting time for module initialization/finalization
!

View File

@ -120,9 +120,9 @@ module io
#ifdef PROFILE
! set timer descriptions
!
call set_timer('I/O initialization' , ioi)
call set_timer('I/O snapshot writing', iow)
call set_timer('I/O snapshot reading', ios)
call set_timer('io:: initialization' , ioi)
call set_timer('io:: snapshot writing', iow)
call set_timer('io:: snapshot reading', ios)
! start accounting time for module initialization/finalization
!

View File

@ -116,13 +116,13 @@ module mesh
#ifdef PROFILE
! set timer descriptions
!
call set_timer('mesh initialization' , imi)
call set_timer('mesh statistics' , ims)
call set_timer('initial mesh generation', img)
call set_timer('adaptive mesh update' , imu)
call set_timer('block autobalancing' , ima)
call set_timer('block restriction' , imr)
call set_timer('block prolongation' , imp)
call set_timer('mesh:: initialization' , imi)
call set_timer('mesh:: statistics' , ims)
call set_timer('mesh:: initial generation', img)
call set_timer('mesh:: adaptive update' , imu)
call set_timer('mesh:: autobalancing' , ima)
call set_timer('mesh:: block restriction' , imr)
call set_timer('mesh:: block prolongation', imp)
! start accounting time for module initialization/finalization
!

View File

@ -104,8 +104,8 @@ module random
#ifdef PROFILE
! set timer descriptions
!
call set_timer('random generator initialization', iri)
call set_timer('random number generation' , irc)
call set_timer('random:: initialization' , iri)
call set_timer('random:: number generation', irc)
! start accounting time for the random number generator
!

View File

@ -117,8 +117,8 @@ module refinement
#ifdef PROFILE
! set timer descriptions
!
call set_timer('refinement initialization' , iri)
call set_timer('refinement criterion estimation', irc)
call set_timer('refinement:: initialization', iri)
call set_timer('refinement:: criterion' , irc)
! start accounting time for module initialization/finalization
!

View File

@ -115,10 +115,10 @@ module schemes
#ifdef PROFILE
! set timer descriptions
!
call set_timer('schemes initialization', imi)
call set_timer('increment update' , imu)
call set_timer('flux update' , imf)
call set_timer('Riemann solver' , imr)
call set_timer('schemes:: initialization' , imi)
call set_timer('schemes:: increment update', imu)
call set_timer('schemes:: flux update' , imf)
call set_timer('schemes:: Riemann solver' , imr)
! start accounting time for module initialization/finalization
!

View File

@ -39,11 +39,11 @@ module timers
! module variables
!
integer , parameter :: ntimers = 128
integer , save :: ntimer
logical , dimension(ntimers), save :: flag
integer , save :: ntimer, norder
logical , dimension(ntimers), save :: ftimer, forder
character(len=32), dimension(ntimers), save :: description
integer(kind=8) , dimension(ntimers), save :: times, tstart, tstop
integer(kind=4) , dimension(ntimers), save :: tcount
integer(kind=4) , dimension(ntimers), save :: tcount, torder
integer(kind=8) , save :: ticks, tbegin
real (kind=8) , save :: conv
@ -85,17 +85,20 @@ module timers
!
call system_clock(count=tbegin, count_rate=ticks)
! initialize the flags signifying that the counter is used
! initialize flags for enabled timers and timer order
!
flag(:) = .false.
ftimer(:) = .false.
forder(:) = .false.
! initialize flag desciptions
!
description(:) = ''
! initialize the next available timer
! initialize the next available timer and the number of occupied positions
! in the order array
!
ntimer = 1
norder = 0
! reset timers
!
@ -103,6 +106,7 @@ module timers
tstart(:) = 0
tstop(:) = 0
tcount(:) = 0
torder(:) = 0
! prepare the conversion factor
!
@ -176,7 +180,7 @@ module timers
! set the timer flag
!
flag(ntimer) = .true.
ftimer(ntimer) = .true.
! return the timer index
!
@ -201,7 +205,7 @@ module timers
!
!===============================================================================
!
subroutine start_timer(timer)
subroutine start_timer(itimer)
! local variables are not implicit by default
!
@ -209,11 +213,27 @@ module timers
! input arguments
!
integer, intent(in) :: timer
integer, intent(in) :: itimer
!
!-------------------------------------------------------------------------------
!
call system_clock(tstart(timer))
! start accounting the time
!
call system_clock(tstart(itimer))
! return, if the timer is already allocated in the order array
!
if (forder(itimer)) return
! otherwise, increase the order position
!
norder = norder + 1
! assign the current timer with the order position and switch the flag
! signifying that the timer is already in the order array
!
torder(norder) = itimer
forder(itimer) = .true.
!-------------------------------------------------------------------------------
!
@ -373,7 +393,7 @@ module timers
!
! estimate the accounted time for the specified timer
!
timer_enabled = flag(timer)
timer_enabled = ftimer(timer)
! return the value
!