summaryrefslogtreecommitdiff
path: root/report/Figures/3.gnu
blob: 49563379d4f4177d041584e2ad8d024c26d9c9d3 (plain)
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
#set term x11 persist
set term cairolatex pdf size 7in,2in
set output "fig43.tex"

set multiplot layout 1,2 margins 0.1, 0.9, 0.1, 0.8 spacing 0.10, 0.0

set datafile separator ","
set datafile missing NaN

ptsize = 0.5

# R ColorBrewer theme (minus yellow)
set linetype 1 lc rgb '#E41A1C' pt 7 ps ptsize
set linetype 2 lc rgb '#377EB8' pt 7 ps ptsize
set linetype 3 lc rgb '#4DAF4A' pt 7 ps ptsize
set linetype 4 lc rgb '#984EA3' pt 7 ps ptsize
set linetype 5 lc rgb '#FF7F00' pt 7 ps ptsize
set linetype 6  lc rgb '#A65628' pt 7 ps ptsize 
set linetype 7  lc rgb '#F781BF' pt 7 ps ptsize 
set linetype 8  lc rgb '#999999' pt 7 ps ptsize 
set linetype 9 lc rgb '#8DD3C7' pt 7 ps ptsize 
set linetype 10 lc rgb '#BEBADA' pt 7 ps ptsize 
set linetype 11 lc rgb '#FB8072' pt 7 ps ptsize 

#set format x "$10^{%L}$"
#set format y "$10^{%L}$"

set xlabel "Number of Threads" 
set ylabel "Wall Time [s]"
set xtics 0,2
set xrange [0.5:9.5]
set yrange [-45:450]
#set logscale xy
unset key
set grid

#sectors = "1 4 16 64 256 1024"
#particles = "1 4 16 64 256 1024 2048 4096"
particles = "1024 2048 4096"
sectors = "16"

#                                        remove header,    sectors,   particles
plot for [n in particles] sprintf("< awk -F',' 'NR > 1 && $4 == %d && $2 == %d && $3 <= 8 && $3 >=2 ' joedata.csv", int(sectors),int(n)) \
    using 3:5 with linespoints title n." Particles"

# SPEEDUP PLOT
set ylabel "Speedup (vs. 2 threads)"
set yrange [0.5:4.5]
set format y "%.1f"
set offsets graph 0.05, graph 0.05, graph 0.05, graph 0.05
set key at screen 0.5, screen 0.925 center top vertical maxrows 1

plot for [n in particles] \
    baseline = real(system(sprintf("awk -F',' 'NR > 1 && $4 == %d && $2 == %d && $3 == 2 {print $5}' joedata.csv", int(sectors), int(n)))), \
    sprintf("< awk -F',' 'NR > 1 && $4 == %d && $2 == %d && $3 <= 8 && $3 >=2' joedata.csv", int(sectors), int(n)) \
    using 3:(baseline / $5) with linespoints title n." Particles", [2:8] 0.5*x with lines dt 2 lc rgb 'black' notitle
#plot for [n in particles] \
#    baseline = system(sprintf("< awk -F',' 'NR > 1 && $4 == %d && $2 == %d && $3 == 2' joedata.csv", int(sectors),int(n))), \
#    sprintf("< awk -F',' 'NR > 1 && $4 == %d && $2 == %d && $3 <= 8' joedata.csv", int(sectors),int(n)) \
#    using 3:(baseline/$5) with linespoints title n." Particles"

unset multiplot