JHUGen MELA  JHUGen v7.5.6, MELA v2.4.2
Matrix element calculations as used in JHUGen.
coli_stat.F90
Go to the documentation of this file.
1 !!
2 !! File coli_stat.F90 is part of COLLIER
3 !! - A Complex One-Loop Library In Extended Regularizations
4 !!
5 !! Copyright (C) 2015, 2016 Ansgar Denner, Stefan Dittmaier, Lars Hofer
6 !!
7 !! COLLIER is licenced under the GNU GPL version 3, see COPYING for details.
8 !!
9 
10 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11 !
12 ! **********************
13 ! * module coli_stat *
14 ! * by Ansgar Denner *
15 ! **********************
16 !
17 ! functions and subroutines:
18 !
19 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
20 
21 
22 module coli_stat
23 
24  implicit none
25 
26 #ifdef GM
27  integer, parameter :: nmethodC=6, nmethodd=7
28 #else
29 ! integer, parameter :: nmethodC=6, nmethodD=6
30  integer, parameter :: nmethodc=7, nmethodd=7
31 #endif
32  integer, parameter :: kcountc=2**nmethodc
33  integer, parameter :: kcountd=2**nmethodd
34  integer, parameter :: ccountoffset0=20
35  integer, parameter :: ccountoffset1=ccountoffset0+kcountc
36  integer, parameter :: ccountoffset2=ccountoffset1+kcountc
37  integer, parameter :: ccountoffset3=ccountoffset2+kcountc
38  integer, parameter :: dcountoffset0=20
39  integer, parameter :: dcountoffset1=dcountoffset0+kcountd
40  integer, parameter :: dcountoffset2=dcountoffset1+kcountd
41  integer, parameter :: dcountoffset3=dcountoffset2+kcountd
42  integer, parameter :: ncountc=ccountoffset3+2**nmethodc
43  integer, parameter :: ncountd=dcountoffset3+2**nmethodd
44  integer (kind=8) :: ccount(0:ncountc),dcount(0:ncountd)
45 
46 contains
47 
48  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
49  ! subroutine InitStatisticsa_coli
50  !
51  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
52 
53  subroutine initstatisticsa_coli
54 
55  ccount = 0
56  dcount = 0
57 
58  end subroutine initstatisticsa_coli
59 
60 
61 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
62 
63  subroutine printstatistics_coli
64 
65  use coli_aux2
66 
67  integer :: i
68  double precision :: normC,normD
69  character :: stringC(0:ncountC)*32 ! 4*nmethodC
70 #ifdef GM
71  character :: stringD(0:ncountD)*36 ! 4*nmethodD
72 #else
73 ! character :: stringD(0:ncountD)*24 ! 4*nmethodD
74  character :: stringD(0:ncountD)*32 ! 4*nmethodD
75 #endif
76 
77 ! if (nout.ne.0) then
78 ! call setnstatsoutcoli_cll(nout)
79 ! call setnstatsout_coli(nout)
80 ! if (nout.ne.6) then
81 ! call OpenStatisticsOutFileCOLI_cll('output_cll/StatisticsOut.coli')
82 ! end if
83 ! end if
84 
85  normc = dble(max(ccount(0),1))
86  normd = dble(max(dcount(0),1))
87 
88 ! write(*,*) 'printstat C',CCount
89 ! write(*,*) 'printstat D',DCount
90 
91 
92  stringc(0) = 'total '
93  stringc(2**nmethodc) = 'sum '
94  ccount(2**nmethodc+ccountoffset0) = 0
95  ccount(2**nmethodc+ccountoffset1) = 0
96  ccount(2**nmethodc+ccountoffset2) = 0
97  ccount(2**nmethodc+ccountoffset3) = 0
98  do i=1,2**nmethodc-1
99  stringc(i)= ' '
100  if (mod(i,2).eq.1) stringc(i)(1:4) = 'pv1 '
101  if (mod(i,4)-mod(i,2).eq.2) stringc(i)(5:8) = 'pv2 '
102  if (mod(i,8)-mod(i,4).eq.4) stringc(i)(9:12) = ' g '
103  if (mod(i,16)-mod(i,8).eq.8) stringc(i)(13:16) = ' gc '
104  if (mod(i,32)-mod(i,16).eq.16) stringc(i)(17:20) = ' sm '
105  if (mod(i,64)-mod(i,32).eq.32) stringc(i)(21:24) = ' gr '
106  if (mod(i,128)-mod(i,64).eq.64) stringc(i)(25:28) = 'smf '
107  ccount(2**nmethodc+ccountoffset0)=ccount(2**nmethodc+ccountoffset0)+ccount(i+ccountoffset0)
108  ccount(2**nmethodc+ccountoffset1)=ccount(2**nmethodc+ccountoffset1)+ccount(i+ccountoffset1)
109  ccount(2**nmethodc+ccountoffset2)=ccount(2**nmethodc+ccountoffset2)+ccount(i+ccountoffset2)
110  ccount(2**nmethodc+ccountoffset3)=ccount(2**nmethodc+ccountoffset3)+ccount(i+ccountoffset3)
111  end do
112 
113  stringd(0) = 'total '
114  stringd(2**nmethodd) = 'sum '
119  do i=1,2**nmethodd-1
120  stringd(i)= ' '
121  if (mod(i,2).eq.1) stringd(i)(1:4) = 'pv1 '
122  if (mod(i,4)-mod(i,2).eq.2) stringd(i)(5:8) = 'pv2 '
123  if (mod(i,8)-mod(i,4).eq.4) stringd(i)(9:12) = ' g '
124  if (mod(i,16)-mod(i,8).eq.8) stringd(i)(13:16) = ' gc '
125  if (mod(i,32)-mod(i,16).eq.16) stringd(i)(17:20) = ' sm '
126  if (mod(i,64)-mod(i,32).eq.32) stringd(i)(21:24) = ' gr '
127  if (mod(i,128)-mod(i,64).eq.64) stringd(i)(25:28) = 'smf '
128 #ifdef GM
129  if (mod(i,256)-mod(i,128).eq.128) stringd(i)(29:32) = ' gm '
130 #endif
135  end do
136 
137  ccount(19)=0
138  dcount(19)=0
139  do i=1,6
140  ccount(19)=ccount(19)+ccount(i)+ccount(10+i)
141  dcount(19)=dcount(19)+dcount(i)+dcount(10+i)
142  end do
143 
144  write(nstatsout_coli,100)
145 100 format (/' Collier: Numbers for calls of different branches in C and D reduction'/)
146 
147 
148  write(nstatsout_coli,300) (ccount(i),dble(ccount(i))/normc*1d2,i=1,nmethodc), &
149  ccount(8),dble(ccount(8))/normc*1d2, &
150  ccount(9),dble(ccount(9))/normc*1d2, &
151  (ccount(i),dble(ccount(i))/normc*1d2,i=11,10+nmethodc), &
152  ccount(19),dble(ccount(19))/normc*1d2, &
153  ccount(0),dble(ccount(0))/normc*1d2
154 
155 300 format(' #calls C pv1 1 = ',i20,' or ',f10.5,' %'/ &
156  & ' #calls C pv2 1 = ',i20,' or ',f10.5,' %'/ &
157  & ' #calls C g 1 = ',i20,' or ',f10.5,' %'/ &
158  & ' #calls C gc 1 = ',i20,' or ',f10.5,' %'/ &
159  & ' #calls C sm 1 = ',i20,' or ',f10.5,' %'/ &
160  & ' #calls C gr 1 = ',i20,' or ',f10.5,' %'/ &
161  & ' #calls C smf 1 = ',i20,' or ',f10.5,' %'/ &
162 ! & ' #calls C gm 1 = ',i20,' or ',F10.5,' %'/ &
163  & ' #calls C pvs+1 = ',i20,' or ',f10.5,' %'/ &
164  & ' #calls C pvs 1 = ',i20,' or ',f10.5,' %'/ &
165  & ' #calls C pv1 2 = ',i20,' or ',f10.5,' %'/ &
166  & ' #calls C pv2 2 = ',i20,' or ',f10.5,' %'/ &
167  & ' #calls C g 2 = ',i20,' or ',f10.5,' %'/ &
168  & ' #calls C gc 2 = ',i20,' or ',f10.5,' %'/ &
169  & ' #calls C sm 2 = ',i20,' or ',f10.5,' %'/ &
170  & ' #calls C gr 2 = ',i20,' or ',f10.5,' %'/ &
171  & ' #calls C smf 2 = ',i20,' or ',f10.5,' %'/ &
172 ! & ' #calls C gm 2 = ',i20,' or ',F10.5,' %'/ &
173  & ' #calls C all m = ',i20,' or ',f10.5,' %'/ &
174  & ' #calls C = ',i20,' or ',f10.5,' %'/)
175 
176  do i=1,2**nmethodc
177  if (ccount(i+ccountoffset0).ne.0.or.i.eq.2**nmethodc) then
178  write(nstatsout_coli,310) stringc(i),ccount(i+ccountoffset0),dble(ccount(i+ccountoffset0))/normc*1d2
179  end if
180  end do
181  write(nstatsout_coli,310) stringc(0),ccount(0),dble(ccount(0))/normc*1d2
182 
183 310 format(' #calls C ',a32 ,' = ',i16,' or ',f10.5,' %')
184 
185  write(nstatsout_coli,400) (dcount(i),dble(dcount(i))/normd*1d2,i=1,nmethodd), &
186  (dcount(i),dble(dcount(i))/normd*1d2,i=11,10+nmethodd), &
187  dcount(19),dble(dcount(19))/normd*1d2, &
188  dcount(0),dble(dcount(0))/normd*1d2
189 
190 400 format(/' #calls D pv1 1 = ',i20,' or ',f10.5,' %'/ &
191  & ' #calls D pv2 1 = ',i20,' or ',f10.5,' %'/ &
192  & ' #calls D g 1 = ',i20,' or ',f10.5,' %'/ &
193  & ' #calls D gc 1 = ',i20,' or ',f10.5,' %'/ &
194  & ' #calls D sm 1 = ',i20,' or ',f10.5,' %'/ &
195  & ' #calls D gr 1 = ',i20,' or ',f10.5,' %'/ &
196  & ' #calls D smf 1 = ',i20,' or ',f10.5,' %'/ &
197 #ifdef GM
198  & ' #calls D gm 1 = ',i20,' or ',f10.5,' %'/ &
199 #endif
200  & ' #calls D pv1 2 = ',i20,' or ',f10.5,' %'/ &
201  & ' #calls D pv2 2 = ',i20,' or ',f10.5,' %'/ &
202  & ' #calls D g 2 = ',i20,' or ',f10.5,' %'/ &
203  & ' #calls D gc 2 = ',i20,' or ',f10.5,' %'/ &
204  & ' #calls D sm 2 = ',i20,' or ',f10.5,' %'/ &
205  & ' #calls D gr 2 = ',i20,' or ',f10.5,' %'/ &
206  & ' #calls D smf 2 = ',i20,' or ',f10.5,' %'/ &
207 #ifdef GM
208  & ' #calls D gm 2 = ',i20,' or ',f10.5,' %'/ &
209 #endif
210  & ' #calls D all m = ',i20,' or ',f10.5,' %'/ &
211  & ' #calls D = ',i20,' or ',f10.5,' %'/)
212 
213 
214  do i=1,2**nmethodd
215  if (dcount(i+dcountoffset0).ne.0.or.i.eq.2**nmethodd) then
216  write(nstatsout_coli,410) stringd(i),dcount(i+dcountoffset0),dble(dcount(i+dcountoffset0))/normd*1d2
217  end if
218  end do
219  write(nstatsout_coli,410) stringd(0),dcount(0),dble(dcount(0))/normd*1d2
220 
221 #ifdef GM
222 410 format(' #calls D ',a36 ,' = ',i16,' or ',f10.5,' %')
223 #else
224 410 format(' #calls D ',a32 ,' = ',i16,' or ',f10.5,' %')
225 #endif
226 
227  write(nstatsout_coli,110) reqacc_coli
228 110 format (/' Collier: Numbers for calls of different branches in C and D reduction'/ &
229  ' with an accuracy worse than reqacc_coli =',es11.4/)
230 
231  do i=1,2**nmethodc
232  if (ccount(i+ccountoffset1).ne.0.or.i.eq.2**nmethodc) then
233  write(nstatsout_coli,310) stringc(i),ccount(i+ccountoffset1),dble(ccount(i+ccountoffset1))/normc*1d2
234  end if
235  end do
236  write(nstatsout_coli,310) stringc(0),ccount(0),dble(ccount(0))/normc*1d2
237  write(nstatsout_coli,*)
238 
239  do i=1,2**nmethodd
240  if (dcount(i+dcountoffset1).ne.0.or.i.eq.2**nmethodd) then
241  write(nstatsout_coli,410) stringd(i),dcount(i+dcountoffset1),dble(dcount(i+dcountoffset1))/normd*1d2
242  end if
243  end do
244  write(nstatsout_coli,410) stringd(0),dcount(0),dble(dcount(0))/normd*1d2
245 
246  write(nstatsout_coli,130) sqrt(reqacc_coli)
247 130 format (/' Collier: Numbers for calls of different branches in C and D reduction'/ &
248  ' with an accuracy worse than sqrt(reqacc_coli) =',es11.4/)
249 
250  do i=1,2**nmethodc
251  if (ccount(i+ccountoffset3).ne.0.or.i.eq.2**nmethodc) then
252  write(nstatsout_coli,310) stringc(i),ccount(i+ccountoffset3),dble(ccount(i+ccountoffset3))/normc*1d2
253  end if
254  end do
255  write(nstatsout_coli,310) stringc(0),ccount(0),dble(ccount(0))/normc*1d2
256  write(nstatsout_coli,*)
257 
258  do i=1,2**nmethodd
259  if (dcount(i+dcountoffset3).ne.0.or.i.eq.2**nmethodd) then
260  write(nstatsout_coli,410) stringd(i),dcount(i+dcountoffset3),dble(dcount(i+dcountoffset3))/normd*1d2
261  end if
262  end do
263  write(nstatsout_coli,410) stringd(0),dcount(0),dble(dcount(0))/normd*1d2
264 
265 
266  write(nstatsout_coli,120) critacc_coli
267 120 format (/' Collier: Numbers for calls of different branches in C and D reduction'/ &
268  ' with an accuracy worse than critacc_coli =',es11.4/)
269 
270  do i=1,2**nmethodc
271  if (ccount(i+ccountoffset2).ne.0.or.i.eq.2**nmethodc) then
272  write(nstatsout_coli,310) stringc(i),ccount(i+ccountoffset2),dble(ccount(i+ccountoffset2))/normc*1d2
273  end if
274  end do
275  write(nstatsout_coli,310) stringc(0),ccount(0),dble(ccount(0))/normc*1d2
276  write(nstatsout_coli,*)
277 
278  do i=1,2**nmethodd
279  if (dcount(i+dcountoffset2).ne.0.or.i.eq.2**nmethodd) then
280  write(nstatsout_coli,410) stringd(i),dcount(i+dcountoffset2),dble(dcount(i+dcountoffset2))/normd*1d2
281  end if
282  end do
283  write(nstatsout_coli,410) stringd(0),dcount(0),dble(dcount(0))/normd*1d2
284  write(nstatsout_coli,*)
285 
286  end subroutine printstatistics_coli
287 
288 
289 end module coli_stat
coli_stat::dcountoffset3
integer, parameter dcountoffset3
Definition: coli_stat.F90:41
coli_stat::ccountoffset1
integer, parameter ccountoffset1
Definition: coli_stat.F90:35
coli_stat::dcountoffset1
integer, parameter dcountoffset1
Definition: coli_stat.F90:39
coli_stat::ccountoffset2
integer, parameter ccountoffset2
Definition: coli_stat.F90:36
coli_stat::ccountoffset3
integer, parameter ccountoffset3
Definition: coli_stat.F90:37
coli_stat::dcountoffset0
integer, parameter dcountoffset0
Definition: coli_stat.F90:38
coli_aux2::reqacc_coli
double precision reqacc_coli
Definition: coli_aux2.F90:33
coli_aux2
Definition: coli_aux2.F90:23
coli_stat::printstatistics_coli
subroutine printstatistics_coli
Definition: coli_stat.F90:64
coli_stat::kcountd
integer, parameter kcountd
Definition: coli_stat.F90:33
coli_stat::ccountoffset0
integer, parameter ccountoffset0
Definition: coli_stat.F90:34
coli_aux2::nstatsout_coli
integer nstatsout_coli
Definition: coli_aux2.F90:29
coli_stat::initstatisticsa_coli
subroutine initstatisticsa_coli
Definition: coli_stat.F90:54
coli_aux2::critacc_coli
double precision critacc_coli
Definition: coli_aux2.F90:33
coli_stat::nmethodd
integer, parameter nmethodd
Definition: coli_stat.F90:30
coli_stat::ccount
integer(kind=8), dimension(0:ncountc) ccount
Definition: coli_stat.F90:44
coli_stat::dcountoffset2
integer, parameter dcountoffset2
Definition: coli_stat.F90:40
coli_stat
Definition: coli_stat.F90:22
coli_stat::kcountc
integer, parameter kcountc
Definition: coli_stat.F90:32
coli_stat::dcount
integer(kind=8), dimension(0:ncountd) dcount
Definition: coli_stat.F90:44
coli_stat::ncountc
integer, parameter ncountc
Definition: coli_stat.F90:42
coli_stat::ncountd
integer, parameter ncountd
Definition: coli_stat.F90:43