+#!/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