1 |
cnh |
1.1 |
#include "CPP_EEOPTIONS.h" |
2 |
|
|
|
3 |
|
|
SUBROUTINE COMM_STATS |
4 |
|
|
C /==========================================================\ |
5 |
|
|
C | SUBROUTINE COMM_STATS | |
6 |
|
|
C | o Print out statistics from communication routines. | |
7 |
|
|
C \==========================================================/ |
8 |
|
|
IMPLICIT NONE |
9 |
|
|
|
10 |
|
|
C == Global variables == |
11 |
|
|
#include "SIZE.h" |
12 |
|
|
#include "EEPARAMS.h" |
13 |
|
|
#include "EESUPPORT.h" |
14 |
|
|
#include "EXCH.h" |
15 |
|
|
#include "BAR2.h" |
16 |
|
|
|
17 |
|
|
C == Local variables == |
18 |
|
|
INTEGER bi, bj, I |
19 |
|
|
CHARACTER*(MAX_LEN_MBUF) msgBuf |
20 |
|
|
|
21 |
|
|
C o For each tile print its excange statistics |
22 |
|
|
WRITE(msgBuf,'(A)') |
23 |
|
|
& '// ======================================================' |
24 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
25 |
|
|
& SQUEEZE_RIGHT , 1) |
26 |
|
|
WRITE(msgBuf,'(A)') '// Tile <-> Tile communication statistics' |
27 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
28 |
|
|
& SQUEEZE_RIGHT , 1) |
29 |
|
|
WRITE(msgBuf,'(A)') |
30 |
|
|
& '// ======================================================' |
31 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
32 |
|
|
& SQUEEZE_RIGHT , 1) |
33 |
|
|
|
34 |
|
|
IF ( exchCollectStatistics ) THEN |
35 |
|
|
DO bj=1,nSy |
36 |
|
|
DO bi=1,nSx |
37 |
|
|
WRITE(msgBuf,'(A,A,I6.6)') |
38 |
|
|
& '//',' o Tile number: ',tileNo(bi,bj) |
39 |
|
|
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
40 |
|
|
& SQUEEZE_RIGHT , 1) |
41 |
|
|
C o X exchange stats. |
42 |
|
|
WRITE(msgBuf,'(A,A,I15)') |
43 |
|
|
& '//',' No. X exchanges =',exchRecvXExchCount(1,bi,bj) |
44 |
|
|
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
45 |
|
|
& SQUEEZE_RIGHT , 1) |
46 |
|
|
WRITE(msgBuf,'(A,A,I15)') |
47 |
|
|
& '//',' Max. X spins =',exchRecvXSpinMax (1,bi,bj) |
48 |
|
|
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
49 |
|
|
& SQUEEZE_RIGHT , 1) |
50 |
|
|
WRITE(msgBuf,'(A,A,I15)') |
51 |
|
|
& '//',' Min. X spins =',exchRecvXSpinMin (1,bi,bj) |
52 |
|
|
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
53 |
|
|
& SQUEEZE_RIGHT , 1) |
54 |
|
|
WRITE(msgBuf,'(A,A,I15)') |
55 |
|
|
& '//',' Total. X spins =',exchRecvXSpinCount(1,bi,bj) |
56 |
|
|
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
57 |
|
|
& SQUEEZE_RIGHT , 1) |
58 |
|
|
IF ( FLOAT(exchRecvXExchCount(1,bi,bj)) .NE. 0. ) THEN |
59 |
|
|
WRITE(msgBuf,'(A,A,1PE15.2)') |
60 |
|
|
& '//',' Avg. X spins =', |
61 |
cnh |
1.2 |
& FLOAT(exchRecvXSpinCount(1,bi,bj))/ |
62 |
|
|
& FLOAT(exchRecvXExchCount(1,bi,bj)) |
63 |
cnh |
1.1 |
ELSE |
64 |
|
|
WRITE(msgBuf,'(A,A,1PE15.2)') |
65 |
|
|
& '//',' Avg. X spins =', |
66 |
|
|
& 0. |
67 |
|
|
ENDIF |
68 |
|
|
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
69 |
|
|
& SQUEEZE_RIGHT , 1) |
70 |
|
|
C o Y exchange stats. |
71 |
|
|
WRITE(msgBuf,'(A,A,I15)') |
72 |
|
|
& '//',' No. Y exchanges =',exchRecvYExchCount(1,bi,bj) |
73 |
|
|
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
74 |
|
|
& SQUEEZE_RIGHT , 1) |
75 |
|
|
WRITE(msgBuf,'(A,A,I15)') |
76 |
|
|
& '//',' Max. Y spins =',exchRecvYSpinMax (1,bi,bj) |
77 |
|
|
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
78 |
|
|
& SQUEEZE_RIGHT , 1) |
79 |
|
|
WRITE(msgBuf,'(A,A,I15)') |
80 |
|
|
& '//',' Min. Y spins =',exchRecvYSpinMin (1,bi,bj) |
81 |
|
|
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
82 |
|
|
& SQUEEZE_RIGHT , 1) |
83 |
|
|
WRITE(msgBuf,'(A,A,I15)') |
84 |
|
|
& '//',' Total. Y spins =',exchRecvYSpinCount(1,bi,bj) |
85 |
|
|
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
86 |
|
|
& SQUEEZE_RIGHT , 1) |
87 |
|
|
IF ( FLOAT(exchRecvYExchCount(1,bi,bj)) .NE. 0. ) THEN |
88 |
|
|
WRITE(msgBuf,'(A,A,1PE15.2)') |
89 |
|
|
& '//',' Avg. Y spins =', |
90 |
cnh |
1.2 |
& FLOAT(exchRecvYSpinCount(1,bi,bj))/ |
91 |
|
|
& FLOAT(exchRecvYExchCount(1,bi,bj)) |
92 |
cnh |
1.1 |
ELSE |
93 |
|
|
WRITE(msgBuf,'(A,A,1PE15.2)') |
94 |
|
|
& '//',' Avg. Y spins =', |
95 |
|
|
& 0. |
96 |
|
|
ENDIF |
97 |
|
|
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
98 |
|
|
& SQUEEZE_RIGHT , 1) |
99 |
|
|
|
100 |
|
|
ENDDO |
101 |
|
|
ENDDO |
102 |
|
|
ENDIF |
103 |
|
|
|
104 |
|
|
IF ( bar2CollectStatistics ) THEN |
105 |
|
|
DO I=1,nThreads |
106 |
|
|
WRITE(msgBuf,'(A,A,I6.6)') |
107 |
|
|
& '//',' o Thread number: ',I |
108 |
|
|
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
109 |
|
|
& SQUEEZE_RIGHT , 1) |
110 |
|
|
WRITE(msgBuf,'(A,A,I15)') |
111 |
|
|
& '//',' No. barriers =',BAR2_barrierCount(1,I) |
112 |
|
|
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
113 |
|
|
& SQUEEZE_RIGHT , 1) |
114 |
|
|
WRITE(msgBuf,'(A,A,I15)') |
115 |
|
|
& '//',' Max. barrier spins =',BAR2_spinsMax(1,I) |
116 |
|
|
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
117 |
|
|
& SQUEEZE_RIGHT , 1) |
118 |
|
|
WRITE(msgBuf,'(A,A,I15)') |
119 |
|
|
& '//',' Min. barrier spins =',BAR2_spinsMin(1,I) |
120 |
|
|
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
121 |
|
|
& SQUEEZE_RIGHT , 1) |
122 |
|
|
WRITE(msgBuf,'(A,A,I15)') |
123 |
|
|
& '//',' Total barrier spins =',BAR2_spinsCount(1,I) |
124 |
|
|
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
125 |
|
|
& SQUEEZE_RIGHT , 1) |
126 |
|
|
IF ( FLOAT(BAR2_spinsCount(1,I)) .NE. 0. ) THEN |
127 |
|
|
WRITE(msgBuf,'(A,A,1PE15.2)') |
128 |
|
|
& '//',' Avg. barrier spins =', |
129 |
|
|
& FLOAT(BAR2_spinsCount(1,I))/FLOAT(BAR2_barrierCount(1,I)) |
130 |
|
|
ELSE |
131 |
|
|
WRITE(msgBuf,'(A,A,1PE15.2)') |
132 |
|
|
& '//',' Avg. barrier spins =', |
133 |
|
|
& 0. |
134 |
|
|
ENDIF |
135 |
|
|
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
136 |
|
|
& SQUEEZE_RIGHT , 1) |
137 |
|
|
ENDDO |
138 |
|
|
ENDIF |
139 |
|
|
|
140 |
|
|
C |
141 |
|
|
RETURN |
142 |
|
|
END |
143 |
|
|
|