TABLE OF CONTENTS


ABINIT/defs_time [ Modules ]

[ Top ] [ Modules ]

NAME

 defs_time

FUNCTION

 This module contains accumulators for the timer.

COPYRIGHT

 Copyright (C) 2005-2018 ABINIT group (TD)
 This file is distributed under the terms of the
 GNU General Public License, see ~abinit/COPYING
 or http://www.gnu.org/copyleft/gpl.txt .

TODO

 Include the name of all routines: better modularity

PARENTS

    timab,time_accu

SOURCE

23 #if defined HAVE_CONFIG_H
24 #include "config.h"
25 #endif
26 
27 module defs_time
28 
29  use defs_basis
30  use iso_c_binding
31 
32  implicit none
33 
34  private
35 
36 !mtim determines the maximum number of "timing slots" available
37  integer,public,parameter :: mtim=1999
38 
39 ! timeopt is a flag which indicates the suppression or not of the timing.
40  integer,public,save :: timopt=1
41 
42 ! Number of times that the routine has been called
43  integer,public,save :: ncount(mtim)=0
44 
45 ! Accumulating cpu time (1) and wall to wall time (2) for each "timing slots"
46  real(dp),public,save  :: acctim(2,mtim)=zero,tzero(2,mtim)=zero
47 
48 ! Accumulating number of floating point operation and cpu time (1) and wall time (2) for each "performance slot"
49  real(dp),public,save :: papi_accflops(mtim)=zero, papi_acctim(2,mtim)=zero
50 
51 ! Reference value for number of floating point operation and time (cpu and wall) for each performance slot
52  real(dp),public,save :: papi_flops(mtim)=zero , papi_tzero(2,mtim)=zero
53 
54 ! Elapsed time and elapsed number of floating point operation since a reference
55  real(dp),public,save :: papi_tottim(2,mtim)=zero, papi_totflops(mtim)=zero
56 
57  public :: time_set_papiopt
58  public :: time_get_papiopt
59 
60 ! papiopt is a flag which indicates if there is or not an analysis of speed execution is made. 
61 ! By defaut the analysis is not done 
62  integer,private,save :: papiopt=0
63 
64 CONTAINS  !=========================================================================================================================

defs_time/time_get_papiopt [ Functions ]

[ Top ] [ defs_time ] [ Functions ]

NAME

  time_get_papiopt

FUNCTION

  Return the value of papiopt

PARENTS

CHILDREN

SOURCE

121 function time_get_papiopt() 
122 
123  use defs_basis
124 
125 !This section has been created automatically by the script Abilint (TD).
126 !Do not modify the following lines by hand.
127 #undef ABI_FUNC
128 #define ABI_FUNC 'time_get_papiopt'
129 !End of the abilint section
130 
131  implicit none
132 
133 !Arguments ------------------------------------
134 !scalars
135  integer :: time_get_papiopt
136 
137 ! *************************************************************************
138 
139  time_get_papiopt = papiopt
140 
141 end function time_get_papiopt

defs_time/time_set_papiopt [ Functions ]

[ Top ] [ defs_time ] [ Functions ]

NAME

  time_set_papiopt

FUNCTION

  Set the value of papiopt

PARENTS

      abinit

CHILDREN

SOURCE

 83 subroutine time_set_papiopt(opt)
 84 
 85  use defs_basis
 86 
 87 !This section has been created automatically by the script Abilint (TD).
 88 !Do not modify the following lines by hand.
 89 #undef ABI_FUNC
 90 #define ABI_FUNC 'time_set_papiopt'
 91 !End of the abilint section
 92 
 93  implicit none
 94 
 95 !Arguments ------------------------------------
 96 !scalars
 97  integer,intent(in) :: opt
 98 
 99 ! *************************************************************************
100 
101  papiopt = opt
102 
103 end subroutine time_set_papiopt