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

Private GIT Repository
Don't abort when nb == 0.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Sun, 3 Mar 2013 15:31:34 +0000 (16:31 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Sun, 3 Mar 2013 15:41:22 +0000 (16:41 +0100)
supercomp11/data/interactive_plot

index b61b0c0996cd6d55a6e7a366e04f67585dd5c1cc..645880b0c5354ef548105bc5a92dad8da70840f9 100755 (executable)
@@ -13,6 +13,16 @@ toclean+=( $tmpA )
 tmpB=$(mktemp)
 toclean+=( $tmpB )
 
 tmpB=$(mktemp)
 toclean+=( $tmpB )
 
+debug=0
+if [ "$1" = "-d" ]; then
+    debug=1
+    shift
+fi
+
+if_debug() {
+    [ $debug = 1 ] && eval "$@"
+}
+
 RE=${1:-_R[1N]_}
 
 grep -e "$RE" alldata > $tmpA
 RE=${1:-_R[1N]_}
 
 grep -e "$RE" alldata > $tmpA
@@ -51,12 +61,14 @@ $0 ~ re {
 }
 ' \
                 > $tmpB
 }
 ' \
                 > $tmpB
+                title="results_${type}_${ratio}/plat_${platf}/topo_${topo}"
                 if [ ! -s $tmpB ]; then
                 if [ ! -s $tmpB ]; then
+                    if_debug echo "... skip: $title"
                     continue
                 fi
                     continue
                 fi
-                title="results_${type}_${ratio}/plat_${platf}/topo_${topo}"
                 echo "===[ $title ]==="
                 echo "===[ $title ]==="
-                nb=$(expr $(grep -c ^algo $tmpB) - 1)
+                if_debug cat $tmpB
+                nb=$(expr $(grep -c ^algo $tmpB) - 1) || true
 if true; then
                 ### show conv max
                 gnuplot \
 if true; then
                 ### show conv max
                 gnuplot \