From: Arnaud Giersch Date: Wed, 7 Mar 2012 11:08:14 +0000 (+0100) Subject: run-all: add possibility to specify the variants to run in parameter file. X-Git-Tag: exp_20120308~5 X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/commitdiff_plain/8185d5cdd5d8fd1b4c78888a6add91b93f0cfcc0?ds=inline run-all: add possibility to specify the variants to run in parameter file. --- diff --git a/Experimentations/run-all b/Experimentations/run-all index a764c88..c711550 100755 --- a/Experimentations/run-all +++ b/Experimentations/run-all @@ -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" diff --git a/Experimentations/sample_parameters b/Experimentations/sample_parameters index bfa5d67..044db01 100644 --- a/Experimentations/sample_parameters +++ b/Experimentations/sample_parameters @@ -25,6 +25,9 @@ PLATFORMS=( ../platform.xml ) +# variants to run +#VARIANTS=( plain bookkeeping ) + # number of hosts NHOSTS=0