(git:ccc2433)
timings_base_type.F
Go to the documentation of this file.
1 !--------------------------------------------------------------------------------------------------!
2 ! CP2K: A general program to perform molecular dynamics simulations !
3 ! Copyright 2000-2024 CP2K developers group <https://cp2k.org> !
4 ! !
5 ! SPDX-License-Identifier: GPL-2.0-or-later !
6 !--------------------------------------------------------------------------------------------------!
7 ! **************************************************************************************************
8 !> \brief Types used by timings.F and timings_report.F
9 !> The types in this module are used within dict or list, which are
10 !> in turn used in timer_env_type from timings_type.F
11 !> Due to the fortran restriction on cicular module-dependencies these
12 !> "inner-types" had to go into a separate module.
13 !> \par History
14 !> 12.2012 Created [ole]
15 !> \author Ole Schuett
16 ! **************************************************************************************************
18 
19  USE kinds, ONLY: default_string_length,&
20  dp,&
21  int_8
22 
23  IMPLICIT NONE
24  PRIVATE
25 
26  TYPE routine_stat_type
27  INTEGER :: routine_id = -1
28  CHARACTER(len=default_string_length) :: routineN = ""
29  REAL(kind=dp) :: excl_walltime_accu = 0.0_dp
30  REAL(kind=dp) :: incl_walltime_accu = 0.0_dp
31  REAL(kind=dp) :: excl_energy_accu = 0.0_dp
32  REAL(kind=dp) :: incl_energy_accu = 0.0_dp
33  INTEGER :: active_calls = 0
34  INTEGER :: total_calls = 0
35  INTEGER :: stackdepth_accu = 0
36  LOGICAL :: trace = .false.
37  END TYPE routine_stat_type
38 
39  TYPE call_stat_type
40  INTEGER :: total_calls = 0
41  REAL(kind=dp) :: incl_walltime_accu = 0.0_dp
42  REAL(kind=dp) :: incl_energy_accu = 0.0_dp
43  END TYPE call_stat_type
44 
45  TYPE callstack_entry_type
46  INTEGER :: routine_id = -1
47  REAL(kind=dp) :: walltime_start = 0.0_dp
48  REAL(kind=dp) :: energy_start = 0.0_dp
49  END TYPE callstack_entry_type
50 
51  TYPE routine_report_type
52  CHARACTER(LEN=default_string_length) :: routineN = ""
53  REAL(KIND=dp) :: max_icost = 0.0_dp
54  REAL(KIND=dp) :: sum_icost = 0.0_dp
55  REAL(KIND=dp) :: max_ecost = 0.0_dp
56  REAL(KIND=dp) :: sum_ecost = 0.0_dp
57  INTEGER :: max_irank = 0
58  INTEGER :: max_erank = 0
59  INTEGER(kind=int_8) :: max_total_calls = 0
60  INTEGER(kind=int_8) :: sum_total_calls = 0
61  INTEGER(kind=int_8) :: sum_stackdepth = 0
62  END TYPE routine_report_type
63 
64  PUBLIC :: routine_stat_type, call_stat_type, callstack_entry_type, routine_report_type
65 
66 END MODULE timings_base_type
67 
68 ! **************************************************************************************************
69 
Defines the basic variable types.
Definition: kinds.F:23
integer, parameter, public int_8
Definition: kinds.F:54
integer, parameter, public dp
Definition: kinds.F:34
integer, parameter, public default_string_length
Definition: kinds.F:57
Types used by timings.F and timings_report.F The types in this module are used within dict or list,...