commit ccfcf99a982b5690f6681c1602d3a8709b555b94
parent 3cab78887b36ec8436bb72b99019cfff817df14f
Author: Ivan Gankevich <igankevich@ya.ru>
Date: Wed, 18 Jan 2017 18:11:05 +0300
Add processor and I/O overlap plot in R.
Diffstat:
5 files changed, 68 insertions(+), 2 deletions(-)
diff --git a/R/common.R b/R/common.R
@@ -137,3 +137,28 @@ arma.plot_factory_vs_openmp <- function(...) {
lines(x, perf$factory, lty="dashed")
title(xlab=args$xlab, ylab=args$ylab)
}
+
+arma.plot_factory_vs_openmp_overlap <- function(...) {
+ args <- list(...)
+ openmp <- read.csv(file.path("data", "performance", "overlap-openmp.csv"), na.strings="")
+ factory <- read.csv(file.path("data", "performance", "overlap-factory.csv"), na.strings="")
+ openmp$t <- (openmp$t - min(openmp$t)) / args$scale
+ factory$t <- (factory$t - min(factory$t)) / args$scale
+ plot.new()
+ plot.window(xlim=range(c(factory$t, openmp$t)),ylim=range(0, 5))
+ axis(1)
+ axis(2, at=c(1, 3), labels=args$labels, las=1, hadj=1)
+ # OpenMP
+ lines(openmp$t, rep.int(3, length(openmp$t)))
+ openmp_pts <- openmp[!is.na(openmp$mark),]
+ openmp_y <- rep.int(3, length(openmp_pts$t))
+ points(openmp_pts$t, openmp_y)
+ text(openmp_pts$t, openmp_y, labels=openmp_pts$mark, pos=c(3, 3, 1, 1))
+ # Factory
+ lines(factory$t, rep.int(1, length(factory$t)))
+ factory_pts <- factory[!is.na(factory$mark),]
+ factory_y <- rep.int(1, length(factory_pts$t))
+ points(factory_pts$t, factory_y)
+ text(factory_pts$t, factory_y, labels=factory_pts$mark, pos=c(3, 1, 3, 1))
+ title(xlab=args$xlab)
+}
diff --git a/data/performance/overlap-factory.csv b/data/performance/overlap-factory.csv
@@ -0,0 +1,7 @@
+t,mark
+856632019315375,
+856632366634850,G_0
+856632502311413,W_0
+856653615740198,W_1
+856653615746769,G_1
+856653634687539,
diff --git a/data/performance/overlap-openmp.csv b/data/performance/overlap-openmp.csv
@@ -0,0 +1,7 @@
+t,mark
+856601220966013,
+856601399800174,G_0
+856619491863579,G_1
+856619505966724,W_0
+856631949369101,W_1
+856632017128894,
diff --git a/phd-diss-ru.org b/phd-diss-ru.org
@@ -2078,12 +2078,22 @@ arma.plot_factory_vs_openmp(
[[file:build/factory-vs-openmp-ru.pdf]]
#+name: fig:factory-overlap
-#+begin_src R :results output graphics :exports results :file build/factory-overlap-ru.pdf
+#+header: :width 9 :height 4
+#+begin_src R :results output graphics :exports results :file build/factory-vs-openmp-overlap-ru.pdf
+dev.off()
+cairo_pdf("build/factory-vs-openmp-overlap-ru.pdf", width=9, height=4)
+source(file.path("R", "common.R"))
+par(mar=c(5, 6, 0, 1), pty="m")
+arma.plot_factory_vs_openmp_overlap(
+ xlab="Время, с.",
+ labels=c(" Factory", "OpenMP"),
+ scale=10**9
+)
#+end_src
#+caption: Наложение параллельных вычислений на $[G_0,G_1]$ и записи данных на диск на $[W_0,W_1]$. В реализации OpenMP наложение отсутствует.
#+RESULTS: fig:factory-overlap
-[[file:build/factory-overlap-ru.pdf]]
+[[file:build/factory-vs-openmp-overlap-ru.pdf]]
Несмотря на то, что технология OpenMP содержит примитивы для создания
конвейеров, соединить конвейером две распараллеленные фазы программы можно
diff --git a/phd-diss.org b/phd-diss.org
@@ -1889,6 +1889,23 @@ arma.plot_factory_vs_openmp(
#+RESULTS: fig:factory-performance
[[file:build/factory-vs-openmp.pdf]]
+#+name: fig:factory-overlap
+#+header: :width 9 :height 4
+#+begin_src R :results output graphics :exports results :file build/factory-vs-openmp-overlap.pdf
+source(file.path("R", "common.R"))
+par(mar=c(5, 6, 0, 1), pty="m")
+arma.plot_factory_vs_openmp_overlap(
+ xlab="Time, s",
+ labels=c(" Factory", "OpenMP"),
+ scale=10**9
+)
+#+end_src
+
+#+caption: Overlap of parallel computations on $[G_0,G_1]$ and data output to disk on $[W_0,W_1]$. In OpenMP implementation there is no overlap.
+#+RESULTS: fig:factory-overlap
+[[file:build/factory-vs-openmp-overlap.pdf]]
+
+
** MPP implementation
*** Cluster node discovery algorithm
*** Fail over algorithm