]> AND Private Git Repository - loba.git/commitdiff
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
ajout de 3 fichiers pour lancer des expés
authorcouturie <couturie@carcariass.(none)>
Mon, 12 Sep 2011 17:43:50 +0000 (19:43 +0200)
committercouturie <couturie@carcariass.(none)>
Mon, 12 Sep 2011 17:43:50 +0000 (19:43 +0200)
Experimentations/ag_parameters
Experimentations/rc_hcube [new file with mode: 0644]
Experimentations/rc_line [new file with mode: 0644]
Experimentations/rc_parameters1
Experimentations/run-all2 [new file with mode: 0755]

index de7856fc4cc8386d3c46b4fa3f97a220a6036389..394e0c2618396309c270ee52c4dc38e628fef6ee 100644 (file)
@@ -39,7 +39,7 @@ LOAD=-1000
 DEADLINE=10000
 
 # optional: additional arguments for loba (default: empty)
 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
 
 # optional: path to binary (default: ./loba)
 #LOBA=./loba
diff --git a/Experimentations/rc_hcube b/Experimentations/rc_hcube
new file mode 100644 (file)
index 0000000..1585110
--- /dev/null
@@ -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 (file)
index 0000000..5a49797
--- /dev/null
@@ -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
index 69911ae81b817af90b3bba8b16c87ff00c3b9aa9..a5288be88d49a59a25af1ee226c5d2f1312572e1 100644 (file)
@@ -29,7 +29,7 @@ LOAD=-100
 DEADLINE=800
 
 # optional: additional arguments for loba (default: empty)
 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
 
 # optional: path to binary (default: ./loba)
 LOBA=../loba
diff --git a/Experimentations/run-all2 b/Experimentations/run-all2
new file mode 100755 (executable)
index 0000000..bdbc3bd
--- /dev/null
@@ -0,0 +1,165 @@
+#!/bin/bash
+
+set -e
+#set -x
+
+usage() {
+    cat >&2 <<EOF
+Usage: $0 [OPTION] <parameters file>
+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