summaryrefslogtreecommitdiff
path: root/report/figures/plots.gnu
diff options
context:
space:
mode:
authorConnor Moore <connor@hhmoore.ca>2026-02-10 10:52:40 -0500
committerConnor Moore <connor@hhmoore.ca>2026-02-10 10:52:40 -0500
commit258970eaf49a77897ae6ae8a8019ed86983c9e0d (patch)
tree74471d1ce5e0b87cb09ea650fb33b51c5888c3dc /report/figures/plots.gnu
parent91d1dbe8d7d6a20f949208b2d55f9eb635276016 (diff)
Implemented feedback. Redid plots and gnuplot file.
Diffstat (limited to 'report/figures/plots.gnu')
-rw-r--r--report/figures/plots.gnu211
1 files changed, 68 insertions, 143 deletions
diff --git a/report/figures/plots.gnu b/report/figures/plots.gnu
index 3f64e8c..3342372 100644
--- a/report/figures/plots.gnu
+++ b/report/figures/plots.gnu
@@ -1,172 +1,97 @@
+# Global settings
set datafile separator ","
-set xtics 2000
-set xtics rotate by -90
+# Borrowing the ColorBrewer set 1 theme from R for colours
+set linetype 1 lc rgb '#E41A1C' pt 7 ps 0.3
+set linetype 2 lc rgb '#377EB8' pt 7 ps 0.3
+set linetype 3 lc rgb '#4DAF4A' pt 7 ps 0.3
+set linetype 4 lc rgb '#984EA3' pt 7 ps 0.3
+
+# Logscale ad tics for cairolatex
+set logscale xy 10
+set format y '$10^{%T}$'
-# SERIAL, O3, GFORTRAN-SPECIFIC RESULTS (FIGURE 1)
+# Make them evenly spaced this time
+set xtics autofreq
+set mxtics 10
+set mytics 10
-#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
+# And look good as well
+set grid xtics ytics # Log-grid
+set offsets graph 0.05, graph 0.05, graph 0.05, graph 0.05
+set key above center horizontal
+# === FIGURE 1: SERIAL GFORTRAN ===
+set terminal cairolatex pdf size 5in,2.5in
+set output "f1_n_scaling.tex"
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"
+plot 'gfortran_O3_serial.csv' using 1:($2 > 0 ? $2 : 1/0) with linespoints title "Row-major loop", \
+ 'gfortran_O3_serial.csv' using 1:($3 > 0 ? $3 : 1/0) with linespoints title "Col.-major loop", \
+ 'gfortran_O3_serial.csv' using 1:4 with linespoints title "\\texttt{Matmul}", \
+ 'gfortran_O3_serial.csv' using 1:5 with linespoints title "DGEMM", \
+ 1e-11*x**3 with line lc rgb 'black' dt 2 notitle
-
-# 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
+# === FIGURE 2: COMPILER COMPARISON (LOOPS) ===
+#set xtics (100,150,200,300,400,500,700,1000,1500,2100,3000)
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", \
+set xrange[40:10000]
+plot 'ifx_vs_gfortran_O3_serial_results.csv' index 0 using 2:($3 > 0 ? $3 : 1/0) with linespoints title "\\texttt{gfortran}: Row-major", \
+ 'ifx_vs_gfortran_O3_serial_results.csv' index 0 using 2:($4 > 0 ? $4 : 1/0) with linespoints title "\\texttt{gfortran}: Col.-major", \
+ 'ifx_vs_gfortran_O3_serial_results.csv' index 1 using 2:($3 > 0 ? $3 : 1/0) with linespoints title "\\texttt{ifx}: Row-major", \
+ 'ifx_vs_gfortran_O3_serial_results.csv' index 1 using 2:($4 > 0 ? $4 : 1/0) with linespoints title "\\texttt{ifx}: Col.-major", \
+ 1e-11*x**3 with line lc rgb 'black' dt 2 notitle
-# 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
+# === FIGURE 3: COMPILER COMPARISON (BLAS) ===
+#set xtics (100,150,200,300,400,500,700,1000,1500,2100,3000,4500,7000,11000)
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', \
-
+plot "ifx_vs_gfortran_O3_serial_results.csv" index 0 using 2:($5 > 0 ? $5 : 1/0) with linespoints title "\\texttt{gfortran}: \\texttt{matmul}", \
+ "ifx_vs_gfortran_O3_serial_results.csv" index 0 using 2:($6 > 0 ? $6 : 1/0) with linespoints title "\\texttt{gfortran}: OpenBLAS", \
+ "ifx_vs_gfortran_O3_serial_results.csv" index 1 using 2:($5 > 0 ? $5 : 1/0) with linespoints title "\\texttt{ifx}: \\texttt{matmul}", \
+ "ifx_vs_gfortran_O3_serial_results.csv" index 1 using 2:($6 > 0 ? $6 : 1/0) with linespoints title "\\texttt{ifx}: MKL BLAS", \
+ 1e-11*x**3 with line lc rgb "black" dt 2 notitle
-# PARALLEL, O3, COMPILER-DEPEDENT WALL TIMES. LOOPS ONLY (FIGURE 4)
-
-set xtics 1000
-set terminal cairolatex pdf size 5in,3in
+# === FIGURE 4: PARALLEL LOOPS ===
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]
+set xrange[40:10000]
-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", \
+plot "ifx_vs_gfortran_parallel_O3_results.csv" index 0 using 2:($3 > 0 ? $3 : 1/0) with linespoints title "\\texttt{gfortran}: Row-major", \
+ "ifx_vs_gfortran_parallel_O3_results.csv" index 0 using 2:($4 > 0 ? $4 : 1/0) with linespoints title "\\texttt{gfortran}: Col.-major", \
+ "ifx_vs_gfortran_parallel_O3_results.csv" index 1 using 2:($3 > 0 ? $3 : 1/0) with linespoints title "\\texttt{ifx}: Row-major", \
+ "ifx_vs_gfortran_parallel_O3_results.csv" index 1 using 2:($4 > 0 ? $4 : 1/0) with linespoints title "\\texttt{ifx}: Col.-major", \
+ 1e-11*x**3 with line lc rgb 'black' dt 2 notitle
-# PARALLEL, O3, COMPILER-DEPENDENT WALL TIMES. MATMUL/BLAS ONLY (FIGURE 5)
-
-set terminal cairolatex pdf size 5in,3in
+# === FIGURE 5: PARALLEL BLAS ===
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)
+plot "ifx_vs_gfortran_parallel_O3_results.csv" index 0 using 2:($5 > 0 ? $5 : 1/0) with linespoints title "\\texttt{gfortran}: \\texttt{matmul}", \
+ "ifx_vs_gfortran_parallel_O3_results.csv" index 0 using 2:($6 > 0 ? $6 : 1/0) with linespoints title "\\texttt{gfortran}: OpenBLAS", \
+ "ifx_vs_gfortran_parallel_O3_results.csv" index 1 using 2:($5 > 0 ? $5 : 1/0) with linespoints title "\\texttt{ifx}: \\texttt{matmul}", \
+ "ifx_vs_gfortran_parallel_O3_results.csv" index 1 using 2:($6 > 0 ? $6 : 1/0) with linespoints title "\\texttt{ifx}: MKL BLAS", \
+ 1e-11*x**3 with line lc rgb 'black' dt 2 notitle
-#set terminal x11 persist
-set terminal cairolatex pdf size 5in,3in
+# === FIGURE 6: GFORTRAN FLAGS ===
set output "f6_optflags_scaling.tex"
+set xrange[40:10000]
-set logscale y 10
-set logscale x 10
-set xtics 1000
+plot "gfortran_rowloop_optflags.csv" using 1:2 with linespoints title "\\texttt{gfortran}: O1", \
+ "gfortran_rowloop_optflags.csv" using 1:3 with linespoints title "\\texttt{gfortran}: O2", \
+ "gfortran_rowloop_optflags.csv" using 1:4 with linespoints title "\\texttt{gfortran}: O3", \
+ "gfortran_rowloop_optflags.csv" using 1:5 with linespoints title "\\texttt{gfortran}: Ofast", \
+ 1e-10*x**3 with line lc rgb 'black' dt 2 notitle
-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
+# === FIGURE 7: IFX FLAGS ===
set output "f7_optflags_scaling.tex"
+set xrange[40:10000]
-set logscale y 10
-set logscale x 10
-set xtics 1000
+plot "ifx_rowloop_optflags.csv" using 1:2 with linespoints title "\\texttt{ifx}: O1", \
+ "ifx_rowloop_optflags.csv" using 1:3 with linespoints title "\\texttt{ifx}: O2", \
+ "ifx_rowloop_optflags.csv" using 1:4 with linespoints title "\\texttt{ifx}: O3", \
+ "ifx_rowloop_optflags.csv" using 1:5 with linespoints title "\\texttt{ifx}: Ofast", \
+ 1e-11*x**3 with line lc rgb 'black' dt 2 notitle
-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', \