X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/cd83815d1aaa00919c7f972eeba5be8ceb2a9f18..c2e3e8bc788aa97edc116a151feb705cf77fce57:/Experimentations/run-all?ds=inline diff --git a/Experimentations/run-all b/Experimentations/run-all index d423b4d..5584528 100755 --- a/Experimentations/run-all +++ b/Experimentations/run-all @@ -5,7 +5,7 @@ set -e usage() { cat >&2 < +Usage: $0 [OPTION] Options: -h print this help -n dry-run mode (for debugging) @@ -49,7 +49,7 @@ parameters="$1" log "Running: $0 $@" log "Hostname: $(hostname -f)" -declare -a TOPOLOGIES ALGORITHMS PLATFORMS COMMON_OPTS +declare -a TOPOLOGIES ALGORITHMS PLATFORMS COMMON_OPTS MORE_ARGS # read parameters log "Reading parameters from \"$1\"." @@ -68,6 +68,7 @@ variable_check DEADLINE COMMON_OPTS=( --cfg=contexts/factory:raw + "${MORE_ARGS[@]}" ) log "Results put in: \"$RESULTS\"." @@ -78,6 +79,12 @@ outfile() { echo "$*" | sed 's,[^ ]*/,,g;s/\.xml//;y/ /_/' } +summary() { + sed -n '\!^\[main/INFO\] ,----\[ Results \]!,${ + /send\|recv\|wall clock\|Simulation succeeded/d;p; + }' "$1" +} + for plat in "${PLATFORMS[@]}"; do tmp=$(basename "$plat" ".xml") plat_output="$RESULTS/plat_$tmp" @@ -101,17 +108,15 @@ for plat in "${PLATFORMS[@]}"; do log "Run: ${cmd[@]}"$'\n'"... &> $out" if [ $overwrite = 0 -a -e "$out" ]; then log "already run !" - tail -n4 "$out" + summary "$out" continue fi if [ $debug = 1 ]; then log "skipped (dry-run)" else echo "# ${cmd[@]}" > "$out" - out2="/tmp/tmp_loba.o" - "${cmd[@]}" > "$out2" 2>&1 - tail -17 "$out2" >> "$out" - tail -n4 "$out" + "${cmd[@]}" >> "$out" 2>&1 + summary "$out" fi done done