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

Private GIT Repository
Add experimental plot script.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 20 Feb 2013 11:13:07 +0000 (12:13 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 20 Feb 2013 11:13:07 +0000 (12:13 +0100)
supercomp11/data/interactive_plot [new file with mode: 0644]

diff --git a/supercomp11/data/interactive_plot b/supercomp11/data/interactive_plot
new file mode 100644 (file)
index 0000000..ccfedc0
--- /dev/null
@@ -0,0 +1,74 @@
+#!/bin/bash
+
+set -e
+
+declare -a toclean
+cleanup() {
+    test ${#toclean[@]} -gt 0 && rm -f "${toclean[@]}"
+}
+trap cleanup EXIT
+
+tmpA=$(mktemp)
+toclean+=( $tmpA )
+tmpB=$(mktemp)
+toclean+=( $tmpB )
+
+grep '_[IR]N_.*bookkeeping' alldata > $tmpA
+
+for type in I R; do
+    for ratio in 10:1 1:1 1:10; do
+        for platf in cluster grid; do
+            for topo in line torus hcube; do
+                title="results_${type}N_${ratio}/plat_${platf}/topo_${topo}"
+                echo "===[ $title ]==="
+                < $tmpA awk \
+                    -v re="^results_${type}N_${ratio}/plat_${platf}[0-9]+/topo_${topo}" \
+'
+$0 ~ re {
+    split($1, cfg, "/");
+    platf=cfg[2];
+    algo=cfg[4];
+    size=substr(platf, match(platf, "[0-9]"));
+    idle=$4;
+    conv_avg=$5;
+    conv_max=$6;
+    if (conv_max > 0.0)
+        print algo, size, idle, conv_avg, conv_max;
+}
+' \
+                | sort -k1,1r -k2,2n \
+                | awk \
+'
+{
+    if (NR == 1) {
+        printf("%s\n", $1);
+    } else if ($1 != prev) {
+        printf("\n\n%s\n", $1);
+    }
+    prev=$1;
+    $1="";
+    print;
+}
+' \
+                > $tmpB
+if true; then
+                ### show conv max
+                gnuplot \
+                    -e "set title '$title'" \
+                    -e "plot
+for [i=0:3] '$tmpB' index i using 1:4 with linespoint ls i+1 title column(1)" \
+                    -e "pause mouse"
+else
+                ### all idle avg; conv avg; conv max
+                gnuplot \
+                    -e "set title '$title'" \
+                    -e "plot
+for [i=0:3] '$tmpB' index i using 1:4 with linespoint ls i+1 title column(1),
+for [i=0:3] '$tmpB' index i using 1:3 with linespoint ls i+1 notitle,
+for [i=0:3] '$tmpB' index i using 1:2 with linespoint ls i+1 notitle" \
+                    -e "pause mouse"
+fi
+            done
+        done
+    done
+done
\ No newline at end of file