]> AND Private Git Repository - loba.git/blobdiff - Experimentations/run-all
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
Add VARIANTS to ag_parameters. Create ag_parameters1024 for big platforms.
[loba.git] / Experimentations / run-all
index 9d4354292b0c7fab232ef51bae877ea7f873d6b2..c7115502b587bb86980f19d71e154a419ece9ef9 100755 (executable)
@@ -52,7 +52,7 @@ parameters="$1"
 log "Running: $0 $@"
 log "Hostname: $(hostname -f)"
 
 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\"."
 
 # read parameters
 log "Reading parameters from \"$1\"."
@@ -66,14 +66,16 @@ variable_check LOAD
 variable_check DEADLINE
 
 # default values
 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=(
 
 COMMON_OPTS=(
-    --cfg=contexts/factory:raw
     "${MORE_ARGS[@]}"
 )
 
     "${MORE_ARGS[@]}"
 )
 
+test -x "$LOBA" || die "command not found: \"$LOBA\""
+
 log "Results put in: \"$RESULTS\"."
 
 [ $debug = 1 ] && log "Running in dry-run mode"
 log "Results put in: \"$RESULTS\"."
 
 [ $debug = 1 ] && log "Running in dry-run mode"
@@ -100,9 +102,9 @@ for plat in "${PLATFORMS[@]}"; do
     plat_output="$RESULTS/plat_$tmp"
     for topo in "${TOPOLOGIES[@]}"; do
         topo_output="$plat_output/topo_$topo"
     plat_output="$RESULTS/plat_$tmp"
     for topo in "${TOPOLOGIES[@]}"; do
         topo_output="$plat_output/topo_$topo"
+        [ $debug = 0 ] && mkdir -p "$topo_output"
         for algo in "${ALGORITHMS[@]}"; do
             algo_output="$topo_output/algo_$algo"
         for algo in "${ALGORITHMS[@]}"; do
             algo_output="$topo_output/algo_$algo"
-            [ $debug = 0 ] && mkdir -p "$algo_output"
             args=(
                 -T"$topo"
                 -a"$algo"
             args=(
                 -T"$topo"
                 -a"$algo"
@@ -111,11 +113,16 @@ for plat in "${PLATFORMS[@]}"; do
                 -t"$DEADLINE"
                 "$plat"
             )
                 -t"$DEADLINE"
                 "$plat"
             )
-            for bk in "" "-b"; do
-                tmp=$(outfile "loba" $bk "${args[@]}")
-                out="$algo_output/$tmp.out"
+            for variant in "${VARIANTS[@]}"; do
+                cmd=( "$LOBA" "${COMMON_OPTS[@]}" )
+                case "$variant" in
+                    "plain") : ;;
+                    "bookkeeping") cmd+=( "-b" ) ;;
+                    *) die "unknown variant: \"$variant\"" ;;
+                esac
+                out="${algo_output}_${variant}.out"
                 outf="$out$outsuffix"
                 outf="$out$outsuffix"
-                cmd=( "$LOBA" "${COMMON_OPTS[@]}" $bk "${args[@]}" )
+                cmd+=( "${args[@]}" )
                 log "Run: ${cmd[@]}"$'\n'"... &> $outf"
                 if [ $overwrite = 0 -a -e "$outf" ]; then
                     log "already run !"
                 log "Run: ${cmd[@]}"$'\n'"... &> $outf"
                 if [ $overwrite = 0 -a -e "$outf" ]; then
                     log "already run !"