From: couturie Date: Mon, 12 Sep 2011 17:43:50 +0000 (+0200) Subject: ajout de 3 fichiers pour lancer des expés X-Git-Tag: v0.1~11 X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/commitdiff_plain/5ed91ecd196e066ba88ff13f3dc8e2fa76bcf61f?ds=inline ajout de 3 fichiers pour lancer des expés --- diff --git a/Experimentations/ag_parameters b/Experimentations/ag_parameters index de7856f..394e0c2 100644 --- a/Experimentations/ag_parameters +++ b/Experimentations/ag_parameters @@ -39,7 +39,7 @@ LOAD=-1000 DEADLINE=10000 # optional: additional arguments for loba (default: empty) -#MORE_ARGS=( -r 42 ) +MORE_ARGS=( -r 42 ) # optional: path to binary (default: ./loba) #LOBA=./loba diff --git a/Experimentations/rc_hcube b/Experimentations/rc_hcube new file mode 100644 index 0000000..1585110 --- /dev/null +++ b/Experimentations/rc_hcube @@ -0,0 +1,38 @@ +### PARAMETER FILE FOR RC'S EXPERIMENTATIONS + +# define the topologies +TOPOLOGIES=( + hcube +) + +# define the algorithms +ALGORITHMS=( + simple + makhoul + besteffort + 2besteffort + +) + +# the different platform files +PLATFORMS=( + cluster64.xml +) + +# number of hosts +NHOSTS=0 + +# total load +LOAD=-100 + +# time limit for the simulation +DEADLINE=800 + +# optional: additional arguments for loba (default: empty) +MORE_ARGS=( -c1e8,0 -C1e5,0 -M10) + +# optional: path to binary (default: ./loba) +LOBA=../loba + +# optional: path to results (default: ./results) +RESULTS=./results_hcube diff --git a/Experimentations/rc_line b/Experimentations/rc_line new file mode 100644 index 0000000..5a49797 --- /dev/null +++ b/Experimentations/rc_line @@ -0,0 +1,38 @@ +### PARAMETER FILE FOR RC'S EXPERIMENTATIONS + +# define the topologies +TOPOLOGIES=( + line +) + +# define the algorithms +ALGORITHMS=( + simple + makhoul + besteffort + 2besteffort + +) + +# the different platform files +PLATFORMS=( + cluster64.xml +) + +# number of hosts +NHOSTS=0 + +# total load +LOAD=-100 + +# time limit for the simulation +DEADLINE=6000 + +# optional: additional arguments for loba (default: empty) +MORE_ARGS=( -c1e8,0 -C1e5,0 -M10) + +# optional: path to binary (default: ./loba) +LOBA=../loba + +# optional: path to results (default: ./results) +RESULTS=./results_line diff --git a/Experimentations/rc_parameters1 b/Experimentations/rc_parameters1 index 69911ae..a5288be 100644 --- a/Experimentations/rc_parameters1 +++ b/Experimentations/rc_parameters1 @@ -29,7 +29,7 @@ LOAD=-100 DEADLINE=800 # optional: additional arguments for loba (default: empty) -MORE_ARGS=( -r 42 -c1e8,0 -C1e5,0) +MORE_ARGS=( -r 42 -c1e8,0 -C1e5,0 -M10) # optional: path to binary (default: ./loba) LOBA=../loba diff --git a/Experimentations/run-all2 b/Experimentations/run-all2 new file mode 100755 index 0000000..bdbc3bd --- /dev/null +++ b/Experimentations/run-all2 @@ -0,0 +1,165 @@ +#!/bin/bash + +set -e +#set -x + +usage() { + cat >&2 < +Options: + -h print this help + -n dry-run mode (for debugging) + -c (continue) do not overwrite previous results + -z compress output files with gzip +EOF + exit $1 +} + +log() { + echo "-#- $@" >&2 +} + +die() { + echo "ERROR: $@" >&2 + exit 2 +} + +variable_check() { + eval test -n "\${$1}" || die "undefined $1" +} + +array_check() { + eval test "\${#$1}" -gt 0 || die "undefined $1" +} + +# read args +overwrite=1 +debug=0 +compress=0 +while getopts "chnz" c; do + case "$c" in + 'c') overwrite=0 ;; + 'h') usage 0 ;; + 'n') debug=1 ;; + 'z') compress=1 ;; + '?') usage 1 ;; + esac +done +shift $((OPTIND - 1)) +[ $# -eq 1 ] || usage 1 +parameters="$1" + +log "Running: $0 $@" +log "Hostname: $(hostname -f)" + +declare -a TOPOLOGIES ALGORITHMS PLATFORMS COMMON_OPTS MORE_ARGS + +# read parameters +log "Reading parameters from \"$1\"." +source "$parameters" || die "cannot read parameters file: \"$parameters\"" + +array_check TOPOLOGIES +array_check ALGORITHMS +array_check PLATFORMS +variable_check NHOSTS +variable_check LOAD +variable_check DEADLINE + +# default values +: ${RESULTS:=$PWD/results} +: ${LOBA:=$PWD/loba} + +COMMON_OPTS=( + --cfg=contexts/factory:raw + "${MORE_ARGS[@]}" +) + +log "Results put in: \"$RESULTS\"." + +[ $debug = 1 ] && log "Running in dry-run mode" + +outfile() { + echo "$*" | sed 's,[^ ]*/,,g;s/\.xml//;y/ /_/' +} + +summary() { + gzip -cdf "$@" \ + | sed -n '\!^\[main/INFO\] ,----\[ Results \]!,${ + /send\|recv\|wall clock\|Simulation succeeded/d;p; + }' +} + +if [ $compress = 1 ]; then + outsuffix=".gz" +else + outsuffix="" +fi + +for plat in "${PLATFORMS[@]}"; do + tmp=$(basename "$plat" ".xml") + plat_output="$RESULTS/plat_$tmp" + for topo in "${TOPOLOGIES[@]}"; do + topo_output="$plat_output/topo_$topo" + [ $debug = 0 ] && mkdir -p "$topo_output" + for lr in "1" "N"; do + case "$lr" in + "1") loadinit=( ) ;; + "N") loadinit=( "-R" "-r42" ) ;; + *) die "internal error (lr = \"$lr\")" ;; + esac + for mode in "R" "Z"; do + case "$mode" in + "R") computemode=( );; + "Z") computemode=( "-Z" );; + *) die "internal error (mode = \"$mode\")" ;; + esac + for algo in "${ALGORITHMS[@]}"; do + algo_output="$topo_output/algo_$algo" + args=( + -T"$topo" + -a"$algo" + -N"$NHOSTS" + -L"$LOAD" + -t"$DEADLINE" + "${loadinit[@]}" + "${computemode[@]}" + "$plat" + ) + + for bk in "plain" "bookkeeping"; do + cmd=( "$LOBA" "${COMMON_OPTS[@]}" ) + case "$bk" in + "plain") : ;; + "bookkeeping") cmd+=( "-b" ) ;; + *) die "internal error (bk = \"$bk\")" ;; + esac + out="${algo_output}_${bk}_${lr}${mode}.out" + outf="$out$outsuffix" + cmd+=( "${args[@]}" ) + log "Run: ${cmd[@]}"$'\n'"... &> $outf" + if [ $overwrite = 0 -a -e "$outf" ]; then + log "already run !" + summary "$outf" + continue + fi + if [ $debug = 1 ]; then + log "skipped (dry-run)" + continue + fi + rm -f "$outf"; + echo "# ${cmd[@]}" > "$out" + if "${cmd[@]}" >> "$out" 2>&1; then + summary "$out" + else + grep -v '/INFO\]' "$out" + fi + if [ $compress = 1 ]; then + log "Compress output file." + gzip --best "$out" + fi + done + done + done + done + done +done