# Gnuplot script # plot relative timing parallel vs. sequential reset set macros set term png enhanced font arial 10 size 300,400 #set term png enhanced size 700,500 set xlabel "log_{10}N" #set key left top Right reverse set key left bottom Right #set xrange [2**20 : 2**35] set xrange [5.6 : 10.8] set yrange [1:60] set ytics (1,2,3,4,8,10,20,40) #set logscale x set logscale y set grid ### parallel vs. sequential #set ylabel "Parallel OpenMP gain in performance" #hosts= "cluster51 cluster42 rut cluster nuke" #nproc= "40 20 4 4 2 " hosts= "cluster51 cluster42 rut " nproc= "40 20 4 " colors="green blue red yellow" #colors="green blue red dark-violet" # reset index of default line styles set for [i=1:words(colors)] linetype i lw 2 lc rgb word(colors, i) # prepare data files for plotting dir="./data2/" #ext=".o2native" #ext=".o2" tests="SUM E PI" caps="S E PI" flags="o2 o2native" x1=10.5 x0=8. do for [f=1:words(flags)] { ext=".".word(flags, f) do for [t=1:words(tests)] { c=word(caps, t) s="_".word(tests, t).ext set output sprintf('para%s.png',s) # set title "Gain in performance from parallelization in the test ".c # set title "Parallel gain, test ".c set label 1 sprintf("{/*1.2 Test %s}",c) at x0,50 left set label 2 "Optimization:" at x1,6 right if(f==1){set label 3 "-O2" at x1,5 right} if(f==2){set label 3 "-O2 -march=native" at x1,5 right} plot for [i=1:words(hosts)] dir."80_".word(hosts,i).s using (log10($2)):($5/$9)\ title word(hosts,i)." Threads=".word(nproc,i) with lp } }