--- /dev/null
+#!/bin/bash
+
+getval() {
+ zcat -f -- "$1" \
+ | grep -e '^\[main/' \
+ | awk '
+ /\| Load/ { total_load = $(NF - 4); load_dev = $NF; next; }
+ /\| Computation/ { comp_sum = $(NF - 4); next; }
+ /\| Data send amount/ { data_sum = $(NF - 4); next; }
+ /\| Ctrl send count/ { ctrl_sum = $(NF - 4); next; }
+ /\| Total simulated time/ { duration = $NF; next; }
+ /caught CTRL-C/ { interrupted = 1; nextfile; }
+ /Simulation succeeded/ { success = 1; next; }
+ END{
+ ok = success && !interrupted
+ if (ok)
+ print total_load, load_dev, comp_sum,
+ data_sum, ctrl_sum, duration;
+ else
+ print "n/a", "n/a", "n/a", "n/a", "n/a", "n/a"
+ exit (ok? 0: 1);
+ }
+ '
+}
+
+format='%-75s %6s %11s %11s %11s %11s %9s\n'
+printf "$format" \
+ "# Experimentation" \
+ "Total" "Stddev" "Comput." \
+ "Data amnt" "Ctrl mesg" "Duration"
+for file; do
+ name=${file%%.gz}
+ name=${name%%.out}
+ if values=$(getval "$file"); then
+ printf "$format" "$name" $values
+ else
+ printf "$format" "#$name" $values
+ fi
+done
--- /dev/null
+#!/usr/bin/gawk -f
+
+BEGIN {
+ # HARDCODED PARAMETERS
+ if (!load_per_node) {
+ load_per_node = 1000; # average load per node
+ printf "WARNING: Hardcoded load_per_node: %g\n", load_per_node > "/dev/stderr";
+ }
+ if (!theo_dur) {
+ theo_dur = 10000.0; # theoretical time limit
+ printf "WARNING: Hardcoded theo_dur: %g\n", theo_dur > "/dev/stderr";
+ }
+ if (!comp_factor) {
+ comp_factor = 1e6; # computing factor ( -c )
+ printf "WARNING: Hardcoded comp_factor: %g\n", comp_factor > "/dev/stderr";
+ }
+ if (!comm_factor) {
+ comm_factor = 1.25e5; # communication factor ( -C )
+ printf "WARNING: Hardcoded comm_factor: %g\n", comm_factor > "/dev/stderr";
+ printf " comm_factor will be adjusted by ratio from exp. name\n" > "/dev/stderr";
+ adjust_comm_factor = 1;
+ }
+ if (!comp_power) { # average computing power per node
+ comp_power = 1e9;
+ printf "WARNING: Hardcoded comp_power: %g\n", comp_power > "/dev/stderr";
+ }
+
+ if (print_overhead) {
+ printf "%-75s %11s %11s %11s %14s %11s\n", "# Experimentation",
+ "Overhead", "Comput.(1)", "Comput.(2)", "Data amnt", "Stddev";
+ } else {
+ printf "%-75s %11s %11s %14s %11s\n", "# Experimentation",
+ "Comput.(1)", "Comput.(2)", "Data amnt", "Stddev";
+ }
+}
+
+/^# Experiment/ {
+ next;
+}
+
+/^#/ {
+ print;
+ next;
+}
+
+{
+ total_load = $2;
+ nodes = total_load / load_per_node;
+ stddev = 100.0 * $3 / load_per_node;
+ computed = $4;
+ real_dur = $7;
+ comp_cap = comp_power * nodes;
+ theo_comp = 100.0 * computed / (theo_dur * comp_cap);
+ real_comp = 100.0 * computed / (real_dur * comp_cap);
+ if (adjust_comm_factor) {
+ # find comp/comm ratio
+ split($1, tmp, "[_/:]")
+ ratio = tmp[4] / tmp[3]
+ real_comm_factor = comm_factor * ratio;
+ } else {
+ real_comm_factor = comm_factor;
+ }
+# printf "# real_comm_factor: %g\n", real_comm_factor > "/dev/stderr";
+ data_total = total_load * real_comm_factor;
+ data = $5 / data_total;
+ if (print_overhead) {
+ overhead = 100.0 * (real_dur / theo_dur - 1.0);
+ printf "%-75s %11.4f %11.4f %11.4f %14.4f %11.4f\n",
+ $1, overhead, theo_comp, real_comp, data, stddev;
+ } else {
+ printf "%-75s %11.4f %11.4f %14.4f %11.4f\n",
+ $1, theo_comp, real_comp, data, stddev;
+ }
+}
\ No newline at end of file