commit de5dd56585b0080eff907ad5e9f2ac2cc0c34dbe
parent c2a1456fa03d0dd6c713b43611ae141132e1d81c
Author: Ivan Gankevich <igankevich@ya.ru>
Date: Tue, 26 Mar 2019 19:32:24 +0300
Add OpenCL simuation step duration and FPS.
Diffstat:
R/profile.R | | | 19 | ++++++++++++++++--- |
main.tex | | | 29 | ++++++++++++++++++++++++++++- |
shell/profile | | | 90 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
3 files changed, 134 insertions(+), 4 deletions(-)
diff --git a/R/profile.R b/R/profile.R
@@ -50,6 +50,7 @@ profiles <- list(
table <- data.frame(
node=rep(NA,0),
profile=rep(NA,0),
+ nthreads=rep(NA,0),
fps1=rep(NA,0),
fps2=rep(NA,0),
waves=rep(NA,0),
@@ -61,8 +62,16 @@ table <- data.frame(
total=rep(NA,0)
)
+cat(do.call(paste, c(as.list(colnames(table)),sep='|')), file='build/profile.csv', fill=TRUE)
+
for (node in c('gpulab1', 'capybara1', 'storm')) {
for (test in profiles[[node]]) {
+ tokens <- strsplit(test,split='-',fixed=TRUE)[[1]]
+ test_name <- tokens[[1]]
+ nthreads <- 1
+ if (length(tokens) == 2) {
+ nthreads <- as.integer(tokens[[2]])
+ }
filename <- paste('profile-',test,'.log',sep='')
path <- file.path('profile', 'sphere', node, filename)
#print(path)
@@ -89,9 +98,10 @@ for (node in c('gpulab1', 'capybara1', 'storm')) {
pressure <- vtb.median('compute_wave_pressure')
exchange <- vtb.median('exchange')
total <- vtb.median('step')
- table[nrow(table)+1,] <- list(
+ row <- list(
node,
- test,
+ test_name,
+ nthreads,
fps1,
fps2,
waves,
@@ -102,9 +112,12 @@ for (node in c('gpulab1', 'capybara1', 'storm')) {
exchange,
total
)
-
+ cat(do.call(paste, c(row,sep='|')), file='build/profile.csv', append=TRUE, fill=TRUE)
+ table[nrow(table)+1,] <- row
}
}
options(width=120)
table
+
+#aggregate(list(t=table$total), by=list(node=table$node), min)
diff --git a/main.tex b/main.tex
@@ -356,12 +356,22 @@ the second category, so we choose single precision in all benchmarks.
\begin{table}
\centering
- \caption{Hardware configuration and compiler options for
+ \caption{Hardware configurations and compiler options for
benchmarks.\label{tab:setup}}
\begin{tabular}{ll}
\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} \\
\bottomrule
@@ -451,6 +461,23 @@ impact of ocean waves.
\subsection{Benchmark results}
+\begin{table}
+ \centering
+ \caption{Best median simulation step computation time in milliseconds and
+ best median no. of frames per second for each workstation and each ship
+ hull.\label{tab:benchmark1}}
+ \begin{tabular}{lrrr}
+ \toprule
+ & Aurora & MICW & Sphere \\
+ \midrule
+ Storm & & & 21 (47) \\
+ GPUlab & & & 15 (69) \\
+ Capybara & & & 22 (46) \\
+ \bottomrule
+ \end{tabular}
+\end{table}
+
+
\section{Discussion}
\section{Conclusion}
diff --git a/shell/profile b/shell/profile
@@ -0,0 +1,90 @@
+#!/bin/sh
+
+echo
+echo
+echo
+echo
+echo
+echo
+echo
+echo
+echo
+echo
+
+query() {
+ sqlite3 $db << EOF
+.mode column
+.headers on
+$*
+EOF
+}
+
+src=build/profile.csv
+db=build/profile.sqlite3
+rm -f $db
+
+query '
+CREATE TABLE profile(
+ "node" TEXT,
+ "profile" TEXT,
+ "nthreads" INTEGER,
+ "fps1" FLOAT,
+ "fps2" FLOAT,
+ "waves" FLOAT,
+ "velocity" FLOAT,
+ "wetted" FLOAT,
+ "clamp" FLOAT,
+ "pressure" FLOAT,
+ "exchange" FLOAT,
+ "total" FLOAT
+);
+'
+sqlite3 $db << EOF
+.import $src profile
+DELETE FROM profile WHERE node='node'
+EOF
+
+for i in sequential openmp opencl
+do
+ echo
+ echo "Best time ($i)"
+ query "
+ SELECT node,profile,nthreads, MIN(total)
+ FROM profile
+ WHERE profile='$i'
+ GROUP BY node,profile
+ "
+done
+
+echo
+echo "Best time (all)"
+query '
+SELECT node, profile, nthreads, MIN(total)
+FROM profile
+GROUP BY node
+'
+
+echo
+echo "Best simulation FPS (all)"
+query '
+SELECT node, profile, nthreads, MAX(fps1)
+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
+#'
+