arma-thesis

git clone https://git.igankevich.com/arma-thesis.git
Log | Files | Refs | LICENSE

commit 706ec447f682a301514c5c2d9a58805e034f5e92
parent f1bfd7d9b2f28532fc1c372560727081c193a498
Author: Ivan Gankevich <igankevich@ya.ru>
Date:   Sat, 23 Jun 2018 15:30:16 +0300

Redo last slides.

Diffstat:
R/benchmarks.R | 102++++++++++++++++++++++++++++++++++++++++++-------------------------------------
arma-slides-ru.org | 195+++++++++++++++++++++++++++----------------------------------------------------
2 files changed, 120 insertions(+), 177 deletions(-)

diff --git a/R/benchmarks.R b/R/benchmarks.R @@ -31,13 +31,19 @@ arma.print_openmp_vs_opencl <- function(model_names, row_names) { frameworks <- c("openmp", "opencl") tags <- list( determine_coefficients=c("deteremine_coefficients", "determine_coefficients"), - "validate", - "generate_surface", + validate=c("validate"), + generate_surface=c("generate_surface"), nit=c("nit_acf", "nit_realisation"), - "copy_to_host", + copy_to_host=c("copy_to_host"), velocity=c("window_function", "second_function", "fft", "dev_to_host_copy"), - "write_all" + write_all=c("write_all") ) + # remove names that were not requested + for (name in names(tags)) { + if (!(name %in% names(row_names))) { + tags[[name]] <- NULL + } + } all_data <- list() for (framework in frameworks) { all_data[[framework]] <- arma.load_benchmark_data("a4", framework, models, tags) @@ -322,41 +328,41 @@ arma.load_master_slave_failure_data <- function() { arma.load_bscheduler_data(all_test_cases) } -arma.plot_bscheduler_performance_data <- function (all_data, names) { +arma.plot_bscheduler_performance_data <- function (all_data, args) { + if (!('openmp_args' %in% names(args))) { + args$openmp_args = list(col="black", lty="solid", lwd=1, pch=20) + } + if (!('bsc1_args' %in% names(args))) { + args$bsc1_args = list(col="black", lty="dashed", lwd=1, pch=20) + } + if (!('bsc2_args' %in% names(args))) { + args$bsc2_args = list(col="black", lty="dotted", lwd=1, pch=20) + } plot.new() plot.window(xlim=range(all_data$size), ylim=range(0,all_data$t)) conf <- list( - a=list( + a=c(args$openmp_args, list( framework='a9-single-node-direct-openmp', - color='#000000', - lty="solid", - lwd=1, - name=names$openmp - ), - b=list( + name=args$openmp + )), + b=c(args$bsc1_args, list( framework='a9-single-node-direct-bscheduler', - color='#000000', - lty="dashed", - lwd=1, - name=names$bsc1 - ), - c=list( + name=args$bsc1 + )), + c=c(args$bsc2_args, list( framework='a9-two-nodes-direct-bscheduler', - color='#000000', - lty="dotted", - lwd=1, - name=names$bsc2 - ) + name=args$bsc2 + )) ) for (c in conf) { data <- all_data[all_data$framework==c$framework, ] - lines(data$size, data$t, col=c$color, lty=c$lty) - points(data$size, data$t, col=c$color) + lines(data$size, data$t, col=c$col, lty=c$lty, lwd=c$lwd) + points(data$size, data$t, col=c$col, lwd=c$lwd, pch=c$pch) } legend( "bottomright", legend=sapply(conf, function (c) c$name), - col=sapply(conf, function (c) c$color), + col=sapply(conf, function (c) c$col), lty=sapply(conf, function (c) c$lty), lwd=sapply(conf, function (c) c$lwd) ) @@ -365,41 +371,41 @@ arma.plot_bscheduler_performance_data <- function (all_data, names) { box() } -arma.plot_master_slave_failure_data <- function (all_data, names) { +arma.plot_master_slave_failure_data <- function (all_data, args) { + if (!('master_args' %in% names(args))) { + args$master_args = list(col="black", lty="solid", lwd=1, pch=20) + } + if (!('slave_args' %in% names(args))) { + args$slave_args = list(col="black", lty="dashed", lwd=1, pch=20) + } + if (!('nofailures_args' %in% names(args))) { + args$nofailures_args = list(col="black", lty="dotted", lwd=1, pch=20) + } plot.new() plot.window(xlim=range(all_data$size), ylim=range(0,all_data$t)) conf <- list( - a=list( + a=c(args$master_args, list( framework='a10-failure-direct-master-bscheduler', - color='#000000', - lty="solid", - lwd=1, - name=names$master - ), - b=list( + name=args$master + )), + b=c(args$slave_args, list( framework='a10-failure-direct-slave-bscheduler', - color='#000000', - lty="dashed", - lwd=1, - name=names$slave - ), - c=list( + name=args$slave + )), + c=c(args$nofailures_args, list( framework='a9-single-node-direct-bscheduler', - color='#000000', - lty="dotted", - lwd=1, - name=names$nofailures - ) + name=args$nofailures + )) ) for (c in conf) { data <- all_data[all_data$framework==c$framework, ] - lines(data$size, data$t, col=c$color, lty=c$lty) - points(data$size, data$t, col=c$color) + lines(data$size, data$t, col=c$col, lty=c$lty, lwd=c$lwd) + points(data$size, data$t, col=c$col, lwd=c$lwd, pch=c$pch) } legend( "bottomright", legend=sapply(conf, function (c) c$name), - col=sapply(conf, function (c) c$color), + col=sapply(conf, function (c) c$col), lty=sapply(conf, function (c) c$lty), lwd=sapply(conf, function (c) c$lwd) ) diff --git a/arma-slides-ru.org b/arma-slides-ru.org @@ -109,7 +109,37 @@ \rectemph{theta}{\Theta_{l,m,n}} \rectemph{eps}{\epsilon_{i-l,j-m,k-n}} \end{equation*} -#+BEAMER: \vspace{0.5cm} +#+begin_export latex +\begin{tikzpicture}[remember picture,overlay] +\node[fill=none,baseline,anchor=south west,xshift=1.1cm,yshift=-1.75cm] + (zetaLabel) at (current page.north west) + {\scriptsize{}подъем взволнованной поверхности}; +\node[fill=none,anchor=south east,xshift=-2cm,yshift=-1.75cm] + (epsLabel) at (current page.north east) + {\scriptsize{}белый шум}; +\node[fill=none,baseline,anchor=north west,below=of phi,yshift=0.2cm] + (phiLabel) + {\scriptsize{}коэф. АР}; +\node[fill=none,baseline,anchor=north west,below=of theta,yshift=0.2cm] + (thetaLabel) + {\scriptsize{}коэф. СС}; +\path[->,thick] (zetaLabel.south -| zeta1.north) edge (zeta1.north); +\path[->,thick] (zetaLabel.south -| zeta2.north west) + edge [transform canvas={xshift=2mm}] + (zeta2.north west); +\path[->,thick] (epsLabel.south -| eps.north west) + edge [transform canvas={xshift=2mm}] + (eps.north west); +\path[->,thick] (phiLabel.north -| phi.south west) + edge [transform canvas={xshift=2.5mm}] + (phi.south west); +\path[->,thick] (thetaLabel.north -| theta.south west) + edge [transform canvas={xshift=2.5mm}] + (theta.south west); +\end{tikzpicture} +#+end_export + +#+BEAMER: \vspace{0.5cm}\pause #+begin_src dot :exports results :file build/arma-pipeline-ru.pdf digraph G { @@ -144,36 +174,6 @@ digraph G { #+RESULTS: [[file:build/arma-pipeline-ru.pdf]] -#+begin_export latex -\begin{tikzpicture}[remember picture,overlay] -\node[fill=none,baseline,anchor=south west,xshift=1.1cm,yshift=-1.75cm] - (zetaLabel) at (current page.north west) - {\scriptsize{}подъем взволнованной поверхности}; -\node[fill=none,anchor=south east,xshift=-2cm,yshift=-1.75cm] - (epsLabel) at (current page.north east) - {\scriptsize{}белый шум}; -\node[fill=none,baseline,anchor=north west,below=of phi,yshift=0.2cm] - (phiLabel) - {\scriptsize{}коэф. АР}; -\node[fill=none,baseline,anchor=north west,below=of theta,yshift=0.2cm] - (thetaLabel) - {\scriptsize{}коэф. СС}; -\path[->,thick] (zetaLabel.south -| zeta1.north) edge (zeta1.north); -\path[->,thick] (zetaLabel.south -| zeta2.north west) - edge [transform canvas={xshift=2mm}] - (zeta2.north west); -\path[->,thick] (epsLabel.south -| eps.north west) - edge [transform canvas={xshift=2mm}] - (eps.north west); -\path[->,thick] (phiLabel.north -| phi.south west) - edge [transform canvas={xshift=2.5mm}] - (phi.south west); -\path[->,thick] (thetaLabel.north -| theta.south west) - edge [transform canvas={xshift=2.5mm}] - (theta.south west); -\end{tikzpicture} -#+end_export - ** Notes :PROPERTIES: :BEAMER_env: ignoreheading @@ -628,7 +628,7 @@ arma.plot_nonlinear(file.path("build", "nit-standing"), args) * Поле давлений под дискретно заданной взволнованной поверхностью -** Уравнения потенциального течения +** Уравнения для потенциала скорости :PROPERTIES: :BEAMER_act: <presentation> :END: @@ -651,6 +651,8 @@ arma.plot_nonlinear(file.path("build", "nit-standing"), args) \vspace{-2.5\baselineskip}% \end{beamercolorbox}% % +\pause% +% \spbuArrow{}% \vspace{-0.2cm}% % @@ -665,6 +667,8 @@ arma.plot_nonlinear(file.path("build", "nit-standing"), args) \end{align*}% \vspace{-2.7\baselineskip}% \end{beamercolorbox}% +% +\pause% #+end_export *** Columns @@ -1163,13 +1167,12 @@ model_names <- list( Row.names="\\orgcmidrule{2-4}{5-6}Подпрограмма" ) row_names <- list( - determine_coefficients="Определение коэф.", - validate="Проверка сходимости", - generate_surface="Генерация поверхности", - nit="НБП", - write_all="Запись вывода в файл", - copy_to_host="Копирование данных с GPU", - velocity="Выч. потенциалов скорости" + determine_coefficients="Коэффициенты", + validate="Сходимость", + generate_surface="Поверхность", + write_all="Вывод в файл", + copy_to_host="Копирование с GPU", + velocity="Давления" ) arma.print_openmp_vs_opencl(model_names, row_names) #+end_src @@ -1200,22 +1203,32 @@ OpenMP (процессора) и OpenCL (видеокарты). Из табли #+beamer: \label{slide-mpp} -*** Column 1 +*** Columns :PROPERTIES: -:BEAMER_col: 0.47 +:BEAMER_env: columns +:BEAMER_opt: T :END: -#+header: :width 2 :height 2 :bg #F5F6F5 :font sans +**** Column 1 +:PROPERTIES: +:BEAMER_col: 0.37 +:END: + +#+beamer: \vspace{-1cm} +#+header: :width 2.3 :height 3 :bg #F5F6F5 :font sans #+begin_src R :file build/slides-bscheduler-performance-ru.pdf source(file.path("R", "benchmarks.R")) -par(mgp=c(3,0.4,0), cex=0.7, mar=c(2,2,0,0)) +par(mgp=c(1.5,0.4,0), mar=c(3.2,2.5,0.5,0.7), cex=0.7) data <- arma.load_bscheduler_performance_data() arma.plot_bscheduler_performance_data( data, list( openmp="OpenMP", bsc1="Bscheduler (один узел)", - bsc2="Bscheduler (два узла)" + bsc2="Bscheduler (два узла)", + openmp_args=list(lty="solid", lwd=2, col='#404040', pch=19), + bsc1_args=list(lty="solid", lwd=2, col='#5353AC', pch=19), + bsc2_args=list(lty="solid", lwd=2, col='#E57575', pch=19) ) ) title(xlab="Размер взволнованной поверхности", ylab="Время, сек.") @@ -1224,23 +1237,27 @@ title(xlab="Размер взволнованной поверхности", yla #+RESULTS: [[file:build/slides-bscheduler-performance-ru.pdf]] -*** Column 2 +**** Column 2 :PROPERTIES: -:BEAMER_col: 0.47 +:BEAMER_col: 0.57 :END: +#+beamer: \vspace{-1cm} #+name: fig-master-slave-failure -#+header: :width 2 :height 2 :bg #F5F6F5 :font sans +#+header: :width 3 :height 3 :bg #F5F6F5 :font sans #+begin_src R :file build/slides-master-slave-failure-ru.pdf source(file.path("R", "benchmarks.R")) -par(mgp=c(3,0.4,0), cex=0.7, mar=c(2,2,0,0)) +par(mgp=c(1.5,0.4,0), mar=c(3,2.5,0.5,0.5), cex=0.7) data <- arma.load_master_slave_failure_data() arma.plot_master_slave_failure_data( data, list( master="Bscheduler (главный узел)", slave="Bscheduler (подчиненный узел)", - nofailures="Bscheduler (без выхода из строя)" + nofailures="Bscheduler (без выхода из строя)", + master_args=list(lty="solid", lwd=2, col='#E57575', pch=19), + slave_args=list(lty="solid", lwd=2, col='#5353AC', pch=19), + nofailures_args=list(lty="solid", lwd=2, col='#404040', pch=19) ) ) title(xlab="Размер взволнованной поверхности", ylab="Время, сек.") @@ -1264,86 +1281,6 @@ title(xlab="Размер взволнованной поверхности", yla часть задачи, которая вычислялась на вышедшем из строя узле, и теряется производительность только этого узла. -** Диаграмма :noexport: -:PROPERTIES: -:BEAMER_env: fullframe -:END: - -#+begin_export latex - \tikzset{DataBlock/.style={rectangle,draw=spbuDarkGray,thick,text width=2cm,align=center}}% - \tikzset{Terminator/.style={circle,fill=spbuDarkGray,thick,minimum size=0.4cm,text width=0pt}}% - \tikzset{Comment/.style={draw=none,fill=none,text width=8.8cm}}% - \small - \begin{tikzpicture}[x=6cm,y=0.80cm] - % UML blocks - \node[Terminator] (umlStart) at (0,0) {}; - \node[DataBlock] (umlSpec) at (0,-1) {$S(\omega,\theta)$}; - \node[DataBlock] (umlK) at (0,-2) {$K_{i,j,k}$}; - \node[DataBlock,fill=spbuWhite2] (umlK2) at (0,-3) {$K_{i,j,k}^{*}$}; - \node[DataBlock] (umlPhi) at (0,-4) {$\Phi_{i,j,k}$}; - \node[DataBlock] (umlEps) at (0,-5) {$\epsilon_{i,j,k}$}; - \node[DataBlock,fill=spbuWhite2] (umlZeta2) at (0,-6) {$\zeta_{i,j,k}^{*}$}; - \node[DataBlock] (umlZeta) at (0,-7) {$\zeta_{i,j,k}$}; - \node[DataBlock] (umlVelocity) at (0,-8) {$\phi(x,y,z)$}; - \node[DataBlock] (umlPressure) at (0,-9) {$p(x,y,z)$}; - \node[Terminator] (umlEnd) at (0,-10) {}; - \node[circle,draw=spbuDarkGray,thick,minimum size=0.5cm,text width=0pt] at (0,-10) {}; - - % edges - \path[->,thick] (umlStart.south) edge (umlSpec.north); - \path[thick] (umlSpec.south) edge (umlK.north); - \path[thick] (umlK.south) edge (umlK2.north); - \path[thick] (umlK2.south) edge (umlPhi.north); - \path[thick] (umlPhi.south) edge (umlEps.north); - \path[thick] (umlEps.south) edge (umlZeta2.north); - \path[thick] (umlZeta2.south) edge (umlZeta.north); - \path[thick] (umlZeta.south) edge (umlVelocity.north); - \path[thick] (umlVelocity.south) edge (umlPressure.north); - \path[->,thick] (umlPressure.south) edge (umlEnd.north); - - % comments - \node[align=left,draw=none] at (1,-1) {Частотно-направленный спектр волнения,}; - \node[Comment] at (1,-2) {автоковариационная функция (АКФ),}; - \node[Comment] at (1,-3) {преобразованная АКФ,}; - \node[Comment] at (1,-4) {коэффициенты авторегрессии,}; - \node[Comment] at (1,-5) {белый шум,}; - \node[Comment] at (1,-6) {преобразованная реализация,}; - \node[Comment] at (1,-7) {реализация взволнованной поверхности,}; - \node[Comment] at (1,-8) {потенциал скорости,}; - \node[Comment] at (1,-9) {давление.}; - \end{tikzpicture} -#+end_export - -** Оптимизация записи в файл :noexport: -#+begin_export latex - \begin{columns}[T] - \begin{column}{0.575\textwidth} - \begin{block}{\small Диаграмма событий} - \vspace{0.25\baselineskip}% - \includegraphics{overlap-color} - \end{block} - \end{column} - \begin{column}{0.425\textwidth} - \begin{block}{\small Время генерации} - \vspace{0.25\baselineskip}% - \includegraphics{performance-color} - \end{block} - \end{column} - \end{columns} -#+end_export - -** Отказоустойчивость :noexport: -#+begin_export latex -\centering% -\includegraphics{mpp-time-color} -#+end_export - -** Выводы :noexport: -Программная реализация -- масштабируется на SMP и MPP системы, -- эффективна и без использования GPU -- и отказоустойчива. - * Заключение :PROPERTIES: :BEAMER_env: ignoreheading