Nodes of different colours represent the following:
Solid arrows point from a parent (sub)module to the submodule which is descended from it. Dashed arrows point from a module being used to the module or program unit using it. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | ctimingElementstring | |||
logical, | intent(in), | optional | :: | printit | ||
character(len=*), | intent(in), | optional | :: | wprint |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
SUBROUTINE epStopTime(ctimingElementstring,printit,wprint)
! SUBROUTINE INFORMATION:
! AUTHOR Linda Lawrie
! DATE WRITTEN January 2012
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Implement a timing scheme using start-stop (ref: epStartTime) that will help
! developers pinpoint problems.
! METHODOLOGY EMPLOYED:
! structure similar to recurring error structure.
! REFERENCES:
! na
! USE STATEMENTS:
#if defined (_OPENMP) && defined(TIMER_OMP_GET_WTIME)
use omp_lib ! only here for OMP timer
#endif
USE DataInterfaces, ONLY: ShowFatalError
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(IN) :: ctimingElementstring
LOGICAL, INTENT(IN), OPTIONAL :: printit ! true if it should be printed here.
CHARACTER(len=*), INTENT(IN), OPTIONAL :: wprint ! only needed (and assumed, if printit is true)
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: loop ! testing if already in structure
INTEGER :: found ! indicator for element
REAL(r64) :: stoptime
#ifdef EP_NO_Timings
RETURN
#endif
#ifdef EP_Timings
found=0
DO loop=1,NumTimingElements
IF (Timing(loop)%Element /= ctimingElementstring) cycle
found=loop
ENDDO
IF (found == 0) THEN
CALL ShowFatalError('epStopTime: No element='//trim(ctimingElementstring))
ENDIF
TSTOP(stoptime)
Timing(found)%currentTimeSum=Timing(found)%currentTimeSum+(stoptime-Timing(found)%rstartTime)
IF (PRESENT(printit)) THEN
IF (printit) THEN
SELECT CASE(wprint)
CASE('PRINT_TIME0')
write(*,'(a80,f16.4)') ctimingElementstring, stoptime-Timing(found)%rstartTime
CASE('PRINT_TIME1')
write(*,'(a70,f16.4)') ctimingElementstring, stoptime-Timing(found)%rstartTime
CASE('PRINT_TIME2')
write(*,'(a60,f10.4)') ctimingElementstring, stoptime-Timing(found)%rstartTime
CASE('PRINT_TIME2i')
write(*,'(a56,i4,f10.4)') ctimingElementstring,Timing(found)%calls,Timing(found)%currentTimeSum
CASE('PRINT_TIME3')
write(*,'(a50,f10.4)') ctimingElementstring, stoptime-Timing(found)%rstartTime
CASE('PRINT_TIME3i')
write(*,'(a46,i4,f10.4)') ctimingElementstring,Timing(found)%calls,Timing(found)%currentTimeSum
CASE('PRINT_TIME4')
write(*,'(a40,f10.4)') ctimingElementstring, stoptime-Timing(found)%rstartTime
CASE('PRINT_TIMEX')
write(*,'(a100,f16.6)') ctimingElementstring, stoptime-Timing(found)%rstartTime
CASE('PRINTES')
write(*,'(a80,es22.15)') ctimingElementstring, stoptime-Timing(found)%rstartTime
CASE('PRINT_TIME_AF')
write(*,'(a55,10x,f16.4)') ctimingElementstring, stoptime-Timing(found)%rstartTime
CASE('PRINT_TIME_AIF')
write(*,'(a55,i10,f16.4)') ctimingElementstring,Timing(found)%calls,Timing(found)%currentTimeSum
CASE DEFAULT
write(*,*) trim(ctimingElementstring),Timing(found)%currentTimeSum
END SELECT
ENDIF
!could not cover:
!#define PRINT_TIME_AIIF(a, i1, i2, t) write(*,'(a55,i10,i10,f16.4)') a, i1, i2, t
!#define PRINT_TIME_AIIIF(a, i1, i2, i3, t) write(*,'(a55,i10,i10,i10,f16.55)') a, i1, i2, i3, t
ENDIF
RETURN
#endif
END SUBROUTINE epStopTime