X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/df956a08ede695fb019e5581c25b47a83c8109a7..1d498e972be5597e0f902a1bb8e6ec8d87d51002:/Experimentations/run-all?ds=sidebyside diff --git a/Experimentations/run-all b/Experimentations/run-all index a764c88..5b80fbf 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,14 +66,18 @@ 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[@]}" ) -test -x "$LOBA" || die "command not found: \"$LOBA\"" +test -f "$LOBA" && test -x "$LOBA" || die "command not found: \"$LOBA\"" +for plat in "${PLATFORMS[@]}"; do + test -f "$plat" && test -r "$plat" || die "file not found: \"$plat\"" +done log "Results put in: \"$RESULTS\"." @@ -112,14 +116,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"