source: LMDZ5/trunk/libf/phylmd/rrtm/yomgstats.F90 @ 3312

Last change on this file since 3312 was 2010, checked in by Laurent Fairhead, 11 years ago

Modifications pour OpenMP


OpenMP modifications

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
File size: 4.1 KB
RevLine 
[1989]1MODULE YOMGSTATS
2
3USE PARKIND1  ,ONLY : JPIM     ,JPRB
4
5IMPLICIT NONE
6
7SAVE
8
9!     ------------------------------------------------------------------
10! Module for timing statistics. Module is internal to the GSTATS package -
11! routines GSTATS, SUSTATS and STATS_OUTPUT. The logical switches are
12! re-initialized in SUMPINI
13
14! LSTATS - TRUE for gathering timing statistics
15! LSTATSCPU - TRUE for gathering CPU timing  statistics
16! LSYNCSTATS - TRUE for syncronization (call to barrier) at the
17!              start of timing event
18! LDETAILED_STATS - TRUE for more detail in output
19! LSTATS_OMP - TRUE for gathering timing statistics on OpenMP regions
20!                 1001-1999
21! LSTATS_COMMS - TRUE for gathering detailed timing of Message passing
22!                 501-1000
23! NTRACE_STATS    - max number of entries in trace
24! LTRACE_STATS    - True for trace of all calls to gstats
25! LGSTATS_LABEL   - True after GSTATS-labels have been set
26! JPMAXSTAT - max number of separate  timers in gstats
27! JPOBCOUNT_BASE - first counter for obs types
28! NCALLS - number of times a timer has been switched on
29! TIMESUM - total time spent with timer on
30! TIMESQSUM - sum of the squares of times
31! TIMEMAX - max time of all calls
32! TIMESUMB - sum of times between previous timer was invoked and this
33!            timer was switched on ( to be used for finding out which parts
34!            of the code that is not being timed)
35! TIMELCALL - time when event was switched on or resumed
36! TTCPUSUM - total cpu time
37! TVCPUSUM - total vector cpu time
38! THISTIME - total accumulated time for this call to timing event (necessary
39!            to be able to suspend and resume timer and still have it counted
40!            as one timing event)
41! THISTCPU - as THISTIME but for CPU time
42! THISVCPU - as THISTIME but for vector CPU time
43! TTCPULCALL - as TIMELCALL but for CPU time
44! TVCPULCALL - as TIMELCALL but for vector CPU time
45! TIME_LAST_CALL - last time GSTATS was called
46! TIME_START - used for recording parallel startup time
47
48
49LOGICAL :: LSTATS = .TRUE.
50LOGICAL :: LSTATS_OMP = .FALSE.
51LOGICAL :: LSTATS_COMMS = .FALSE.
52LOGICAL :: LSTATS_MEM = .FALSE.
53LOGICAL :: LSTATS_ALLOC = .FALSE.
54LOGICAL :: LSTATSCPU = .TRUE.
55LOGICAL :: LSYNCSTATS = .FALSE.
56LOGICAL :: LDETAILED_STATS = .TRUE.
57LOGICAL :: LBARRIER_STATS = .FALSE.
58LOGICAL :: LTRACE_STATS = .FALSE.
59LOGICAL :: LGSTATS_LABEL = .FALSE.
60
61INTEGER(KIND=JPIM),PARAMETER :: JPMAXSTAT=2500
62
63INTEGER(KIND=JPIM),PARAMETER :: JPOBCOUNT_BASE=201
64INTEGER(KIND=JPIM) :: NTRACE_STATS=0
65INTEGER(KIND=JPIM) :: NCALLS(0:JPMAXSTAT)
66INTEGER(KIND=JPIM) :: NCALLS_TOTAL=0
67INTEGER(KIND=JPIM),ALLOCATABLE :: NCALL_TRACE(:)
68
69REAL(KIND=JPRB) :: TIMESUM(0:JPMAXSTAT)
70REAL(KIND=JPRB) :: TIMESQSUM(0:JPMAXSTAT)
71REAL(KIND=JPRB) :: TIMEMAX(0:JPMAXSTAT)
72REAL(KIND=JPRB) :: TIMESUMB(0:JPMAXSTAT)
73REAL(KIND=JPRB) :: TIMELCALL(0:JPMAXSTAT)
74REAL(KIND=JPRB) :: TTCPUSUM(0:JPMAXSTAT)
75REAL(KIND=JPRB) :: TVCPUSUM(0:JPMAXSTAT)
76REAL(KIND=JPRB) :: THISTIME(0:JPMAXSTAT)
77REAL(KIND=JPRB) :: THISTCPU(0:JPMAXSTAT)
78REAL(KIND=JPRB) :: THISVCPU(0:JPMAXSTAT)
79REAL(KIND=JPRB) :: TTCPULCALL(0:JPMAXSTAT)
80REAL(KIND=JPRB) :: TVCPULCALL(0:JPMAXSTAT)
81REAL(KIND=JPRB) :: TIME_LAST_CALL
82
83REAL(KIND=JPRB),ALLOCATABLE :: TIME_START(:)
84REAL(KIND=JPRB),ALLOCATABLE :: TIME_TRACE(:)
85INTEGER(KIND=JPIM),PARAMETER :: JPERR=0
86INTEGER(KIND=JPIM),PARAMETER :: JPTAGSTAT=20555
87
88CHARACTER*50 :: CCDESC(0:JPMAXSTAT) = ""
89CHARACTER*3  :: CCTYPE(0:JPMAXSTAT) = ""
90
91INTEGER(KIND=JPIM) :: NPROC_STATS = 1
92INTEGER(KIND=JPIM) :: MYPROC_STATS = 1
93INTEGER(KIND=JPIM),ALLOCATABLE :: NPRCIDS_STATS(:)
94
95INTEGER(KIND=JPIM) :: NTMEM(0:JPMAXSTAT,5)
96INTEGER(KIND=JPIM) :: NSTATS_MEM=0
97
98INTEGER(KIND=JPIM) :: NPRNT_STATS=3
99
[2010]100!$OMP THREADPRIVATE(ccdesc,cctype,lbarrier_stats,ldetailed_stats,lgstats_label,lstats,lstats_alloc)
101!$OMP THREADPRIVATE(lstats_comms,lstats_mem,lstats_omp,lstatscpu,lsyncstats,ltrace_stats,myproc_stats)
102!$OMP THREADPRIVATE(ncalls,ncalls_total,nprnt_stats,nproc_stats,nstats_mem,ntmem,ntrace_stats,thistcpu)
103!$OMP THREADPRIVATE(thistime,thisvcpu,time_last_call,timelcall,timemax,timesqsum,timesum,timesumb)
104!$OMP THREADPRIVATE(ttcpulcall,ttcpusum,tvcpulcall,tvcpusum)
105!$OMP THREADPRIVATE(ncall_trace,nprcids_stats,time_start,time_trace)
[1989]106END MODULE YOMGSTATS
107
108
109
110
Note: See TracBrowser for help on using the repository browser.