#!/usr/bin/env gnuplot # Example gnuplot script for plotting the Roofline model # # Author: Thomas Gruber # Licence: GPLv3 ############################################################################### # Configure output file ############################################################################### # Output file (PNG format) set output 'likwid-roofline.png' ############################################################################### # Set configuration for application ############################################################################### # Operational intensity op_ins = 1.32 # Performance value app_perf = 263460 # The y-axis label # If you want the model in GFLOP/s, make sure to adjust the y-offsets for the # labels (application_offset and max_perf_label_offset) perf_label = 'DP Performance [Mflop/s]' #perf_label = 'SP Performance [Mflop/s]' # Application name application = "Test appl." # The offset is used to place the text right to the application dot application_offset = 2000 ############################################################################### # Set configuration for hardware system ############################################################################### # System description for the plot title #sysdef = "Intel Xeon E5-2630 v4" sysdef = "Fujitsu A64FX (FX700)" # Maximum performance maxperf = 2736974.88 # MFLOP/s, likwid-bench -t peakflops_sve512_fma # Performance label max_perf_label = "SVE512 FMA" # The offset is used to place the text above the roof max_perf_label_offset = 1200 # Maximum bandwidth maxband = 851282.94 # MByte/s, likwid-bench -t load_sve512 # Uncomment for second roof #maxperf2 = 343829.76 # MFLOP/s, e.g. likwid-bench -t peakflops_fma #max_perf_label2 = "Scalar" #max_perf_label_offset2 = 25000 #maxband2 = 851282.94 # MByte/s, e.g. likwid-bench -t load_sve512 ############################################################################### # Combine the information to the Roofline model ############################################################################### # Configure basic plot options set terminal png enhanced set ytics font ",14" set xtics 1 font ",14" set xrange[0:6] # Set axis labels and title set xlabel 'Operational Intensity [flop/byte]' font ", 16" set ylabel perf_label font ", 16" set title sprintf("Roofline model for %s", sysdef) font ", 20" # Add application dot set object circle at first op_ins,app_perf radius char 0.5 fillcolor rgb 'red' fillstyle solid set label 1 at op_ins+0.2,app_perf+application_offset sprintf("%s (%.2f, %.2f)", application, op_ins, app_perf) # Configure roofline style and label set style line 1 linetype 1 linecolor rgb 'black' lw 2 set label 2 at (maxperf/maxband)+0.3,maxperf+(maxperf*0.05) sprintf("%s (%.2f)", max_perf_label, maxperf) font ",10" # Uncomment for second roof in grey color #set style line 2 linetype 1 linecolor rgb 'grey' lw 2 #set label 3 at (maxperf2/maxband2)+0.3,maxperf2+(maxperf2*0.1) sprintf("%s (%.2f)", max_perf_label2, maxperf2) font ",10" # Plot the Roofline model roof(x) = maxperf > (x * maxband) ? (x * maxband) : maxperf # Uncomment for second roof in grey color. Remove '#' in plot line #roof2(x) = maxperf2 > (x * maxband2) ? (x * maxband2) : maxperf2 plot roof(x) ls 1 notitle #, roof2(x) ls 2 notitle