iccsa-19-vtestbed

git clone https://git.igankevich.com/iccsa-19-vtestbed.git
Log | Files | Refs

commit ce33fc7c48f509c95cf645da578ad2d6187447f5
parent ab2e7eb6759e92c7b5cd1bea92b0f92fb3a4f8c8
Author: Ivan Gankevich <igankevich@ya.ru>
Date:   Wed, 27 Mar 2019 17:16:30 +0300

Histgram.

Diffstat:
Makefile | 6+++++-
gnuplot/histogram.gnuplot | 38++++++++++++++++++++++++++++++++++++++
gnuplot/openmp.gnuplot | 15+++++----------
gnuplot/style.gnuplot | 31+++++++++++++++++++++++++++++++
main.tex | 46+++++++++++++++++++++++++---------------------
shell/profile | 30+++++++++++++++++++-----------
6 files changed, 123 insertions(+), 43 deletions(-)

diff --git a/Makefile b/Makefile @@ -14,6 +14,7 @@ NAME = iccsa-19-vtestbed build/$(NAME).pdf: build/aurora.eps build/$(NAME).pdf: build/micw.eps build/$(NAME).pdf: build/openmp.eps +build/$(NAME).pdf: build/histogram.eps build/$(NAME).pdf: main.tex @echo " LATEX $<" @-$(LATEXMK) $(FLAGS) -f $< @@ -21,9 +22,12 @@ build/$(NAME).pdf: main.tex build/%.vsl.svg: data/%.vsl.gnuplot gnuplot -c gnuplot/vessel.gnuplot $< $@ -build/openmp.svg: build/*.openmp.dat gnuplot/openmp.gnuplot +build/openmp.svg: build/*.openmp.dat gnuplot/openmp.gnuplot gnuplot/style.gnuplot ./gnuplot/openmp.gnuplot +build/histogram.svg: build/*.histogram.dat gnuplot/histogram.gnuplot gnuplot/style.gnuplot + ./gnuplot/histogram.gnuplot + build/%.eps: build/%.svg inkscape -z --export-eps=$@ $< diff --git a/gnuplot/histogram.gnuplot b/gnuplot/histogram.gnuplot @@ -0,0 +1,38 @@ +#!/usr/bin/gnuplot -d + +set terminal svg size 1920/6,1080/6 dynamic round font 'Times, 10' lw 0.5 +set key Left reverse outside +set key autotitle columnheader +set ylabel 'Time, ms' offset 2,0 +set xtics rotate by -45 +set ytics 0,20 + +load 'gnuplot/style.gnuplot' + +set style histogram rowstacked title +set style data histograms +set style fill solid border -1 +set boxwidth 0.75 +set output 'build/histogram.svg' +plot \ + newhistogram "Storm", \ + 'build/storm.histogram.dat' \ + using 'waves':xtic(1) ls 1, \ + '' using 'velocity' ls 2, \ + '' using 'wetted' ls 3, \ + '' using 'pressure' ls 4, \ + '' using 'exchange' ls 5, \ + newhistogram "GPUlab", \ + 'build/gpulab1.histogram.dat' \ + using 'waves':xtic(1) ls 1 notitle, \ + '' using 'velocity' ls 2 notitle, \ + '' using 'wetted' ls 3 notitle, \ + '' using 'pressure' ls 4 notitle, \ + '' using 'exchange' ls 5 notitle, \ + newhistogram "Capybara", \ + 'build/capybara1.histogram.dat' \ + using 'waves':xtic(1) ls 1 notitle, \ + '' using 'velocity' ls 2 notitle, \ + '' using 'wetted' ls 3 notitle, \ + '' using 'pressure' ls 4 notitle, \ + '' using 'exchange' ls 5 notitle diff --git a/gnuplot/openmp.gnuplot b/gnuplot/openmp.gnuplot @@ -1,19 +1,14 @@ #!/usr/bin/gnuplot -d set terminal svg size 1920/8,1080/6 dynamic round font 'Times, 10' lw 0.5 -set xtics nomirror out -set ytics nomirror out -set border 1+2 set key Left reverse set xlabel 'No. of parallel threads' offset 0,0.25 -set ylabel 'Time, s' offset 1,0 +set ylabel 'Time, ms' offset 2,0 set xrange [0:10] -set style line 1 lw 3 pt 6 -set style line 2 lw 3 pt 4 -set style line 3 lw 3 pt 8 +load 'gnuplot/style.gnuplot' set output 'build/openmp.svg' plot \ - 'build/storm.openmp.dat' with linespoints ls 1 smooth csplines title 'Storm', \ - 'build/gpulab1.openmp.dat' with linespoints ls 2 smooth csplines title 'GPUlab', \ - 'build/capybara1.openmp.dat' with linespoints ls 3 smooth csplines title 'Capybara' + 'build/storm.openmp.dat' with linespoints ls 1 lw 4 smooth csplines title 'Storm', \ + 'build/gpulab1.openmp.dat' with linespoints ls 2 lw 4 smooth csplines title 'GPUlab', \ + 'build/capybara1.openmp.dat' with linespoints ls 3 lw 4 smooth csplines title 'Capybara' diff --git a/gnuplot/style.gnuplot b/gnuplot/style.gnuplot @@ -0,0 +1,31 @@ + +# line styles for ColorBrewer Paired +# for use with qualitative/categorical data +# provides 8 colors in 4 pairs +# compatible with gnuplot >=4.2 +# author: Anna Schneider + +# line styles +set style line 1 lt 1 lc rgb '#A6CEE3' # light blue +set style line 2 lt 1 lc rgb '#1F78B4' # dark blue +set style line 3 lt 1 lc rgb '#B2DF8A' # light green +set style line 4 lt 1 lc rgb '#33A02C' # dark green +set style line 5 lt 1 lc rgb '#FB9A99' # light red +set style line 6 lt 1 lc rgb '#E31A1C' # dark red +set style line 7 lt 1 lc rgb '#FDBF6F' # light orange +set style line 8 lt 1 lc rgb '#FF7F00' # dark orange + +# palette +set palette maxcolors 8 +set palette defined ( 0 '#A6CEE3',\ + 1 '#1F78B4',\ + 2 '#B2DF8A',\ + 3 '#33A02C',\ + 4 '#FB9A99',\ + 5 '#E31A1C',\ + 6 '#FDBF6F',\ +7 '#FF7F00' ) + +set xtics nomirror out +set ytics nomirror out +set border 1+2 diff --git a/main.tex b/main.tex @@ -350,30 +350,27 @@ Graphical accelerators are divided into two broad categories: for general purpose computations and for visualisation. Accelerators from the first category typically have more double precision arithmetic units and accelerators from the second category are typically optimised for single precision. The -ratio of single to double precision performance can be as high as 32. We ran -all tests on a node with Quadro P5000 (tab.~\ref{tab:setup}) which falls into -the second category, so we choose single precision in all benchmarks. +ratio of single to double precision performance can be as high as 32. Virtual +testbed produces correct results for both single and double precision, but +OpenCL version supports only single precision and graphical accelerators that +we used have higher single precision performance (tab.~\ref{tab:setup}). So we +choose single precision in all benchmarks. \begin{table} \centering - \caption{Hardware configurations and compiler options for - benchmarks.\label{tab:setup}} - \begin{tabular}{ll} + \caption{Hardware configurations for benchmarks.\label{tab:setup}} + \begin{tabular}{lllrr} \toprule - Node & Storm \\ - Graphical accelerator & Radeon R7 360 / R9 360 OEM \\ - Processor & Intel Core 2 Quad CPU Q9550 \\ - \addlinespace - Node & GPUlab \\ - Graphical accelerator & NVIDIA GeForce GTX 1060 \\ - Processor & AMD FX-8370 \\ - \addlinespace - Node & Capybara \\ - Graphical accelerator & NVIDIA Quadro P5000 \\ - Processor & Intel Xeon CPU E5-2630 v4 \\ - \addlinespace - Compiler & GCC 8.1.1 \\ - Compiler options & \texttt{-O3 -march=native} \\ + & & & \multicolumn{2}{c}{GPU GFLOPS} \\ + \cmidrule(r){4-5} + Node & CPU & GPU & Single & Double \\ + \midrule + Storm & Intel Q9550 & Radeon R7 360 & 1613 & 101 \\ + GPUlab & AMD FX-8370 & NVIDIA GTX1060 & 4375 & 137 \\ + Capybara & Intel E5-2630 v4 & NVIDIA P5000 & 8873 & 277 \\ +% \addlinespace +% Compiler & GCC 8.1.1 \\ +% Compiler options & \texttt{-O3 -march=native} \\ \bottomrule \end{tabular} \end{table} @@ -425,7 +422,7 @@ with and without graphical accelerator. The code was compiled with maximum optimisation level including processor-specific optimisations which enabled auto-vectorisation for further performance improvement. -We ran all test for each of the three ship models: Aurora, MICW (a hull with +We ran all tests for each of the three ship models: Aurora, MICW (a hull with reduced moments of inertia for the current waterline) and sphere. The first two models represent real-world ships with known characteristics and were taken from Vessel database~\cite{vessel2015} registered by our university. Parameters @@ -485,6 +482,13 @@ impact of ocean waves. parallel threads (spherical ship hull).\label{fig:openmp}} \end{figure} +\begin{figure} + \centering + \includegraphics{build/histogram.eps} + \caption{\label{fig:histogram}} +\end{figure} + + \section{Discussion} diff --git a/shell/profile b/shell/profile @@ -1,16 +1,5 @@ #!/bin/sh -echo -echo -echo -echo -echo -echo -echo -echo -echo -echo - query() { sqlite3 $db << EOF .mode column @@ -95,3 +84,22 @@ do WHERE profile='openmp' and node='$node' " > build/$node.openmp.dat done + + +echo +echo "Histogram" +for node in $(query_for_shell 'SELECT DISTINCT node FROM profile') +do +query " +.mode csv +.separator ' ' +SELECT profile,waves,velocity,wetted,clamp,pressure,exchange +FROM profile a +WHERE node='$node' AND total = ( + SELECT MIN(total) + FROM profile b + WHERE node='$node' AND a.profile=b.profile + GROUP BY profile +) +" > build/$node.histogram.dat +done