]> AND Private Git Repository - loba-papers.git/commitdiff
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
Add scripts to generate graphs from raw data.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 20 Feb 2013 10:27:50 +0000 (11:27 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 20 Feb 2013 10:27:50 +0000 (11:27 +0100)
supercomp11/.gitignore
supercomp11/data/Makefile [new file with mode: 0644]
supercomp11/data/genalltex [new file with mode: 0755]
supercomp11/data/plot [new file with mode: 0755]
supercomp11/data/plotall [new file with mode: 0755]

index 2311d26e09bccf68dec25f965531dc34ca5e7081..f90c70c537912718dc3e9dca9aa8a9f1533fdfea 100644 (file)
@@ -1,2 +1,7 @@
 supercomp11.pdf
 supercomp11.ps
+
+data/all.tex
+data/all.pdf
+data/results-[IR][1N]-1*.*[01]
+data/results.done
diff --git a/supercomp11/data/Makefile b/supercomp11/data/Makefile
new file mode 100644 (file)
index 0000000..85cc01d
--- /dev/null
@@ -0,0 +1,9 @@
+all.pdf: all.tex results.done
+       pdflatex all.tex
+
+all.tex: genalltex
+       ./genalltex > all.tex
+
+results.done: alldata plot plotall
+       ./plotall
+       touch results.done
diff --git a/supercomp11/data/genalltex b/supercomp11/data/genalltex
new file mode 100755 (executable)
index 0000000..6cfc578
--- /dev/null
@@ -0,0 +1,71 @@
+#!/bin/bash
+
+sizes=( 16 64 256 1024 )
+topologies=( line torus hcube )
+repartitions=( 1 N )
+types=( I R )
+platforms=( cluster grid )
+ratios=( 10.1 1.1 1.10 )
+
+cat <<EOF
+\\documentclass[a4paper]{article}
+
+\\usepackage[T1]{fontenc}
+\\usepackage[utf8]{inputenc}
+\\usepackage{lmodern}
+\\usepackage[margin=1.5cm]{geometry}
+\\usepackage{graphicx}
+\\usepackage[francais]{babel}
+
+%%% workaround warnings about PDF 1.5 not supported
+\\pdfminorversion 5
+
+\\newcommand{\\IG}[1]{%
+  \\includegraphics[width=6cm]{#1}}
+
+\\begin{document}
+
+EOF
+
+for siz in "${sizes[@]}"; do
+    for top in "${topologies[@]}"; do
+        for rep in "${repartitions[@]}"; do
+            test $siz = "1024" -a $rep = "1" && continue
+            cat <<EOF
+\\begin{figure}
+  \\centering
+EOF
+            for typ in "${types[@]}"; do
+                for pla in "${platforms[@]}"; do
+                    for rat in "${ratios[@]}"; do
+                        cat <<EOF
+  \\IG{results-$typ$rep-$rat/plat-$pla$siz/topo-$top.pdf}%
+EOF
+                    done
+                    cat <<EOF
+
+EOF
+                done
+            done
+            case $rep in
+                1) r="all on an only node";;
+                N) r="on all nodes";;
+                *) r="??? $rep ???";;
+            esac
+            case $top in
+                hcube) t="hypercube";;
+                    *) t="$top";;
+            esac
+            cat <<EOF
+  \\caption{$siz nodes, $t topology, initially $r}
+\\end{figure}
+\\clearpage
+
+EOF
+        done
+    done
+done
+
+cat <<EOF
+\end{document}
+EOF
\ No newline at end of file
diff --git a/supercomp11/data/plot b/supercomp11/data/plot
new file mode 100755 (executable)
index 0000000..9fe724d
--- /dev/null
@@ -0,0 +1,33 @@
+#! /usr/bin/gnuplot -p
+
+## TODO : use a variable / set title cmd to set title
+
+set terminal pdfcairo font "Helvetica,12"  size 5in,5in
+set output 'data.tmp.pdf'
+
+#set title "results_I1_10:1/plat_grid64/topo_hcube"
+
+#set key outside
+set nokey
+
+#set size square
+
+set xtic rotate by -75 scale 0 left
+set style data histograms
+set style histogram rowstacked
+set style fill solid border -1
+
+set yrange [0:*]
+set y2range [0:*]
+
+set ytics nomirror
+set y2tics
+
+set ylabel 'Time (s)'
+set y2label 'Data amount (relative)'
+
+plot 'data.tmp' \
+       using 4:xtic(1)                        title 'Idle duration', \
+    '' using ($5 - $4)                        title 'Convergence time (avg)', \
+    '' using ($6 - $5)                        title 'Convergence time (max)', \
+    '' using 3 with linespoint pt 1 axes x1y2 title 'Data transfer amount'
diff --git a/supercomp11/data/plotall b/supercomp11/data/plotall
new file mode 100755 (executable)
index 0000000..bb250d4
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+sed -e '/^#/d' \
+    -e 's,/algo_.*,,' \
+    alldata \
+| sort -u \
+| while read cfg; do
+    echo "##### $cfg #####"
+    grep "^$cfg" alldata \
+    | sed 's/.*algo_//;s/_/ /' \
+    | sort -k2r,2 -k1r,1 \
+    | sed 's/ /_/' > data.tmp
+    gnuplot -e "set title '$cfg'" ./plot
+    rm data.tmp
+    name=$(echo $cfg | tr :_ .-)
+    mkdir -p "${name%/*}"
+    mv data.tmp.pdf "$name".pdf
+done