iccsa-19-vtestbed

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

commit ab2e7eb6759e92c7b5cd1bea92b0f92fb3a4f8c8
parent ff974b299cc108fe9e48b463fa684af2f2adb201
Author: Ivan Gankevich <igankevich@ya.ru>
Date:   Wed, 27 Mar 2019 15:07:32 +0300

Amdahl.

Diffstat:
Makefile | 6+++++-
gnuplot/openmp.gnuplot | 19+++++++++++++++++++
main.tex | 11+++++++++--
shell/profile | 37++++++++++++++++++++++---------------
4 files changed, 55 insertions(+), 18 deletions(-)

diff --git a/Makefile b/Makefile @@ -13,13 +13,17 @@ 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: main.tex @echo " LATEX $<" @-$(LATEXMK) $(FLAGS) -f $< -build/%.svg: data/%.vsl.gnuplot +build/%.vsl.svg: data/%.vsl.gnuplot gnuplot -c gnuplot/vessel.gnuplot $< $@ +build/openmp.svg: build/*.openmp.dat gnuplot/openmp.gnuplot + ./gnuplot/openmp.gnuplot + build/%.eps: build/%.svg inkscape -z --export-eps=$@ $< diff --git a/gnuplot/openmp.gnuplot b/gnuplot/openmp.gnuplot @@ -0,0 +1,19 @@ +#!/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 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 +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' + diff --git a/main.tex b/main.tex @@ -463,8 +463,8 @@ impact of ocean waves. \begin{table} \centering - \caption{Best median performance for each workstation for spherical ship - hull. Here \(t\) is simulation step computation time, + \caption{Best median performance for each workstation (spherical ship + hull). Here \(t\) is simulation step computation time, \(1\text{s}/t\)~--- no. of frames per second, and \(n\)~--- the number of OpenMP threads.\label{tab:benchmark1}} \begin{tabular}{lrrrl} @@ -478,6 +478,13 @@ impact of ocean waves. \end{tabular} \end{table} +\begin{figure} + \centering + \includegraphics{build/openmp.eps} + \caption{Median simulation step computation time for different number of + parallel threads (spherical ship hull).\label{fig:openmp}} +\end{figure} + \section{Discussion} diff --git a/shell/profile b/shell/profile @@ -19,6 +19,17 @@ $* EOF } +query_for_gnuplot() { + sqlite3 $db << EOF +.mode column +$* +EOF +} + +query_for_shell() { + sqlite3 $db "$*" +} + src=build/profile.csv db=build/profile.sqlite3 rm -f $db @@ -72,19 +83,15 @@ FROM profile GROUP BY node ' -#echo -#echo "Best visualisation FPS (all)" -#query ' -#SELECT node, profile, nthreads, MAX(fps2) -#FROM profile -#GROUP BY node -#' -# -#echo -#echo "Worst visualisation FPS (all)" -#query ' -#SELECT node, profile, nthreads, MIN(fps2) -#FROM profile -#GROUP BY node -#' +echo +echo "Amdahl's law" +for node in $(query_for_shell 'SELECT DISTINCT node FROM profile') +do + echo $node + query_for_gnuplot " + SELECT nthreads,total + FROM profile + WHERE profile='openmp' and node='$node' + " > build/$node.openmp.dat +done