]> AND Private Git Repository - loba-papers.git/blobdiff - supercomp11/data/interactive_plot
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
s/paragraph/subsubsection/
[loba-papers.git] / supercomp11 / data / interactive_plot
index ccfedc019bbc6d4d341ff956c093ec4bcb285c07..645880b0c5354ef548105bc5a92dad8da70840f9 100755 (executable)
@@ -13,16 +13,26 @@ toclean+=( $tmpA )
 tmpB=$(mktemp)
 toclean+=( $tmpB )
 
 tmpB=$(mktemp)
 toclean+=( $tmpB )
 
-grep '_[IR]N_.*bookkeeping' alldata > $tmpA
+debug=0
+if [ "$1" = "-d" ]; then
+    debug=1
+    shift
+fi
+
+if_debug() {
+    [ $debug = 1 ] && eval "$@"
+}
+
+RE=${1:-_R[1N]_}
 
 
-for type in I R; do
+grep -e "$RE" alldata > $tmpA
+
+for type in {I,R}{1,N}; do
     for ratio in 10:1 1:1 1:10; do
         for platf in cluster grid; do
             for topo in line torus hcube; 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 \
                 < $tmpA awk \
-                    -v re="^results_${type}N_${ratio}/plat_${platf}[0-9]+/topo_${topo}" \
+                    -v re="^results_${type}_${ratio}/plat_${platf}[0-9]+/topo_${topo}" \
 '
 $0 ~ re {
     split($1, cfg, "/");
 '
 $0 ~ re {
     split($1, cfg, "/");
@@ -51,21 +61,29 @@ $0 ~ re {
 }
 ' \
                 > $tmpB
 }
 ' \
                 > $tmpB
+                title="results_${type}_${ratio}/plat_${platf}/topo_${topo}"
+                if [ ! -s $tmpB ]; then
+                    if_debug echo "... skip: $title"
+                    continue
+                fi
+                echo "===[ $title ]==="
+                if_debug cat $tmpB
+                nb=$(expr $(grep -c ^algo $tmpB) - 1) || true
 if true; then
                 ### show conv max
                 gnuplot \
                     -e "set title '$title'" \
                     -e "plot
 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)" \
+for [i=0:$nb] '$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
                     -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" \
+for [i=0:$nb] '$tmpB' index i using 1:4 with linespoint ls i+1 title column(1),
+for [i=0:$nb] '$tmpB' index i using 1:3 with linespoint ls i+1 notitle,
+for [i=0:$nb] '$tmpB' index i using 1:2 with linespoint ls i+1 notitle" \
                     -e "pause mouse"
 fi
             done
                     -e "pause mouse"
 fi
             done