1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
|
set datafile separator ","
set xtics 2000
set xtics rotate by -90
# SERIAL, O3, GFORTRAN-SPECIFIC RESULTS (FIGURE 1)
#set terminal x11 0 title "Fig. 1 N-scaling" persist
set terminal cairolatex pdf size 5in,3in
set output "f1_n_scaling.tex"
set logscale y 10
set logscale x 10
set xlabel "Size [$N \\times N$]"
set ylabel "Wall Time [s]"
set format y '$10^{%T}$'
set offsets graph 0.05, graph 0.05, graph 0.05, graph 0.05
set key bottom right
set grid
set xrange[70:15500]
plot 'gfortran_O3_serial.csv' using 1:($2 > 0 ? $2 : 1/0) with linespoints pt 7 ps 0.2 title "Row loop", \
'gfortran_O3_serial.csv' using 1:($3 > 0 ? $3 : 1/0) with linespoints pt 7 ps 0.2 title "Col loop",\
'gfortran_O3_serial.csv' using 1:4 with linespoints pt 7 ps 0.2 title "Matmul", \
'gfortran_O3_serial.csv' using 1:5 with linespoints pt 7 ps 0.2 title "DGEMM"
# SERIAL, O3, COMPILER-DEPENDENT WALL TIMES (LOOPS ONLY) (FIGURE 2)
set xtics 1000
#set terminal x11 1 title "Fig.2 Compiler" persist
set terminal cairolatex pdf size 5in,3in
set output "f2_compilers_scaling.tex"
set logscale y 10
set logscale x 10
set xlabel "Size [$N \\times N$]"
set ylabel "Wall Time [s]"
set format y '$10^{%T}$'
set offsets graph 0.05, graph 0.05, graph 0.05, graph 0.05
set key bottom right
set grid
set xrange[70:5000]
plot 'ifx_vs_gfortran_O3_serial_results.csv' index 0 using 2:($3 > 0 ? $3 : 1/0) with linespoints pt 7 ps 0.2 title "GCC: Row loop", \
'ifx_vs_gfortran_O3_serial_results.csv' index 0 using 2:($4 > 0 ? $4 : 1/0) with linespoints pt 7 ps 0.2 title "GCC: Col loop", \
'ifx_vs_gfortran_O3_serial_results.csv' index 1 using 2:($3 > 0 ? $3 : 1/0) with linespoints pt 7 ps 0.2 title "IFX: Row loop", \
'ifx_vs_gfortran_O3_serial_results.csv' index 1 using 2:($4 > 0 ? $4 : 1/0) with linespoints pt 7 ps 0.2 title "IFX: Col loop", \
# SERIAL, O3, COMPILER-DEPENDENT WALL TIMES (MATMUL/BLAS ONLY) (FIGURE 3)
set xtics 2000
#set terminal x11 2 title "Fig.3 Compiler" persist
set terminal cairolatex pdf size 5in,3in
set output "f3_compilers_scaling.tex"
set logscale y 10
set logscale x 10
set xlabel "Size [$N \\times N$]"
set ylabel "Wall Time [s]"
set format y '$10^{%T}$'
set offsets graph 0.05, graph 0.05, graph 0.05, graph 0.05
set key bottom right
set grid
set xrange[70:15500]
plot 'ifx_vs_gfortran_O3_serial_results.csv' index 0 using 2:($5 > 0 ? $5 : 1/0) with linespoints pt 7 ps 0.2 title 'GCC: \texttt{matmul}', \
'ifx_vs_gfortran_O3_serial_results.csv' index 0 using 2:($6 > 0 ? $6 : 1/0) with linespoints pt 7 ps 0.2 title 'GCC: OpenBLAS', \
'ifx_vs_gfortran_O3_serial_results.csv' index 1 using 2:($5 > 0 ? $5 : 1/0) with linespoints pt 7 ps 0.2 title 'IFX: \texttt{matmul}', \
'ifx_vs_gfortran_O3_serial_results.csv' index 1 using 2:($6 > 0 ? $6 : 1/0) with linespoints pt 7 ps 0.2 title 'IFX: MKL BLAS', \
# PARALLEL, O3, COMPILER-DEPEDENT WALL TIMES. LOOPS ONLY (FIGURE 4)
set xtics 1000
set terminal cairolatex pdf size 5in,3in
set output "f4_compilers_scaling.tex"
set logscale y 10
set logscale x 10
set xlabel "Size [$N \\times N$]"
set ylabel "Wall Time [s]"
set format y '$10^{%T}$'
set offsets graph 0.05, graph 0.05, graph 0.05, graph 0.05
set key bottom right
set grid
set xrange[70:5000]
plot 'ifx_vs_gfortran_parallel_O3_results.csv' index 0 using 2:($3 > 0 ? $3 : 1/0) with linespoints pt 7 ps 0.2 title "GCC: Row loop", \
'ifx_vs_gfortran_parallel_O3_results.csv' index 0 using 2:($4 > 0 ? $4 : 1/0) with linespoints pt 7 ps 0.2 title "GCC: Col loop", \
'ifx_vs_gfortran_parallel_O3_results.csv' index 1 using 2:($3 > 0 ? $3 : 1/0) with linespoints pt 7 ps 0.2 title "IFX: Row loop", \
'ifx_vs_gfortran_parallel_O3_results.csv' index 1 using 2:($4 > 0 ? $4 : 1/0) with linespoints pt 7 ps 0.2 title "IFX: Col loop", \
# PARALLEL, O3, COMPILER-DEPENDENT WALL TIMES. MATMUL/BLAS ONLY (FIGURE 5)
set terminal cairolatex pdf size 5in,3in
set output "f5_compilers_scaling.tex"
set logscale y 10
set logscale x 10
set xtics 2000
set xlabel "Size [$N \\times N$]"
set ylabel "Wall Time [s]"
set format y '$10^{%T}$'
set offsets graph 0.05, graph 0.05, graph 0.05, graph 0.05
set key bottom right
set grid
set xrange[70:15500]
plot 'ifx_vs_gfortran_parallel_O3_results.csv' index 0 using 2:($5 > 0 ? $5 : 1/0) with linespoints pt 7 ps 0.2 title 'GCC: \texttt{matmul}', \
'ifx_vs_gfortran_parallel_O3_results.csv' index 0 using 2:($6 > 0 ? $6 : 1/0) with linespoints pt 7 ps 0.2 title 'GCC: OpenBLAS', \
'ifx_vs_gfortran_parallel_O3_results.csv' index 1 using 2:($5 > 0 ? $5 : 1/0) with linespoints pt 7 ps 0.2 title 'IFX: \texttt{matmul}', \
'ifx_vs_gfortran_parallel_O3_results.csv' index 1 using 2:($6 > 0 ? $6 : 1/0) with linespoints pt 7 ps 0.2 title 'IFX: MKL BLAS', \
# COMPILER FLAGS COMPARISON. GFORTRAN ONLY. LOOP ONLY. (FIGURE 6)
#set terminal x11 persist
set terminal cairolatex pdf size 5in,3in
set output "f6_optflags_scaling.tex"
set logscale y 10
set logscale x 10
set xtics 1000
set xlabel "Size [$N \\times N$]"
set ylabel "Wall Time [s]"
set format y '$10^{%T}$'
set offsets graph 0.05, graph 0.05, graph 0.05, graph 0.05
set key bottom right
set grid
set xrange[70:5000]
plot 'gfortran_rowloop_optflags.csv' using 1:2 with linespoints pt 7 ps 0.2 title 'GCC: O1', \
'gfortran_rowloop_optflags.csv' using 1:3 with linespoints pt 7 ps 0.2 title 'GCC: O2', \
'gfortran_rowloop_optflags.csv' using 1:4 with linespoints pt 7 ps 0.2 title 'GCC: O3', \
'gfortran_rowloop_optflags.csv' using 1:5 with linespoints pt 7 ps 0.2 title 'GCC: Ofast', \
# COMPILER FLAGS COMPARISON. IFX ONLY. LOOP ONLY. (FIGURE 7)
#set terminal x11 persist
set terminal cairolatex pdf size 5in,3in
set output "f7_optflags_scaling.tex"
set logscale y 10
set logscale x 10
set xtics 1000
set xlabel "Size [$N \\times N$]"
set ylabel "Wall Time [s]"
set format y '$10^{%T}$'
set offsets graph 0.05, graph 0.05, graph 0.05, graph 0.05
set key bottom right
set grid
set xrange[70:5000]
plot 'ifx_rowloop_optflags.csv' using 1:2 with linespoints pt 7 ps 0.2 title 'IFX: O1', \
'ifx_rowloop_optflags.csv' using 1:3 with linespoints pt 7 ps 0.2 title 'IFX: O2', \
'ifx_rowloop_optflags.csv' using 1:4 with linespoints pt 7 ps 0.2 title 'IFX: O3', \
'ifx_rowloop_optflags.csv' using 1:5 with linespoints pt 7 ps 0.2 title 'IFX: Ofast', \
|