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

Private GIT Repository
run-all: add possibility to specify the variants to run in parameter file.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 7 Mar 2012 11:08:14 +0000 (12:08 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 7 Mar 2012 11:08:14 +0000 (12:08 +0100)
Experimentations/run-all
Experimentations/sample_parameters

index a764c88121dbfe267958f9da92894c08d270fbc2..c7115502b587bb86980f19d71e154a419ece9ef9 100755 (executable)
@@ -52,7 +52,7 @@ parameters="$1"
 log "Running: $0 $@"
 log "Hostname: $(hostname -f)"
 
-declare -a TOPOLOGIES ALGORITHMS PLATFORMS COMMON_OPTS MORE_ARGS
+declare -a TOPOLOGIES ALGORITHMS PLATFORMS VARIANTS COMMON_OPTS MORE_ARGS
 
 # read parameters
 log "Reading parameters from \"$1\"."
@@ -66,8 +66,9 @@ variable_check LOAD
 variable_check DEADLINE
 
 # default values
-: ${RESULTS:=$PWD/results}
-: ${LOBA:=$PWD/loba}
+test -n "$VARIANTS" || VARIANTS=( "plain" "bookkeeping" )
+test -n "$RESULTS"  || RESULTS="$PWD/results"
+test -n "$LOBA"     || LOBA="$PWD/loba"
 
 COMMON_OPTS=(
     "${MORE_ARGS[@]}"
@@ -112,14 +113,14 @@ for plat in "${PLATFORMS[@]}"; do
                 -t"$DEADLINE"
                 "$plat"
             )
-            for bk in "plain" "bookkeeping"; do
+            for variant in "${VARIANTS[@]}"; do
                 cmd=( "$LOBA" "${COMMON_OPTS[@]}" )
-                case "$bk" in
+                case "$variant" in
                     "plain") : ;;
                     "bookkeeping") cmd+=( "-b" ) ;;
-                    *) die "internal error (bk = \"$bk\")" ;;
+                    *) die "unknown variant: \"$variant\"" ;;
                 esac
-                out="${algo_output}_${bk}.out"
+                out="${algo_output}_${variant}.out"
                 outf="$out$outsuffix"
                 cmd+=( "${args[@]}" )
                 log "Run: ${cmd[@]}"$'\n'"... &> $outf"
index bfa5d67de5763c935bb438dd1f3bb81a72e15108..044db019f39747d6022a2f3a311734d44eebca10 100644 (file)
@@ -25,6 +25,9 @@ PLATFORMS=(
     ../platform.xml
 )
 
+# variants to run
+#VARIANTS=( plain bookkeeping )
+
 # number of hosts
 NHOSTS=0