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\"."
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\""
+
log "Results put in: \"$RESULTS\"."
[ $debug = 1 ] && log "Running in dry-run mode"
-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"