# Global settings set datafile separator "," # 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}$' # Make them evenly spaced this time set xtics autofreq set mxtics 10 set mytics 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 xrange[70:15500] 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 # === 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 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 # === 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 xrange[70:15500] 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 # === FIGURE 4: PARALLEL LOOPS === set output "f4_compilers_scaling.tex" set xrange[40:10000] 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 # === FIGURE 5: PARALLEL BLAS === set output "f5_compilers_scaling.tex" set xrange[70:15500] 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 # === FIGURE 6: GFORTRAN FLAGS === set output "f6_optflags_scaling.tex" set xrange[40:10000] 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 # === FIGURE 7: IFX FLAGS === set output "f7_optflags_scaling.tex" set xrange[40:10000] 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 # === FIGURE 8: PARALLEL SPEEDUP BLAS === set output "f8_parallel_speedup.tex" set xrange[70:15500] set ytics nomirror set y2tics set y2label "Difference [\\%]" set y2range [-25:85] plot "f8_parallel.csv" using 1:2 with linespoints title "\\texttt{gfortran}: Serial OpenBLAS", \ "f8_parallel.csv" using 1:3 with linespoints title "\\texttt{gfortran}: Parallel OpenBLAS", \ "f8_parallel.csv" using 1:4 axes x1y2 with linespoints dt 4 title "Percent Difference (From Parallel to Serial)", \ 1e-11*x**3 with line lc rgb 'black' dt 2 notitle # === FIGURE 9: PARALLEL SPEEDUP LOOPS === set output "f9_parallel_speedup.tex" set xrange[40:10000] set ytics nomirror set y2tics set y2label "Difference [\\%]" set y2range [-125:250] plot "f9_parallel.csv" using 1:2 with linespoints title "\\texttt{gfortran}: Serial Loop", \ "f9_parallel.csv" using 1:3 with linespoints title "\\texttt{gfortran}: Parallel Loop", \ "f9_parallel.csv" using 1:4 axes x1y2 with linespoints dt 4 title "Percent Difference (From Parallel to Serial)", \ 1e-10*x**3 with line lc rgb 'black' dt 2 notitle