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

Private GIT Repository
ag_parameters: update.
[loba.git] / Experimentations / rc_normalize
1 #!/usr/bin/gawk -f
2
3 BEGIN {
4     # HARDCODED PARAMETERS
5     if (!load_per_node) {
6         load_per_node = 1000;   # average load per node
7         printf "WARNING: Hardcoded load_per_node: %g\n", load_per_node > "/dev/stderr";
8     }
9     if (!theo_dur) {
10         theo_dur = 10000.0;     # theoretical time limit
11         printf "WARNING: Hardcoded theo_dur: %g\n", theo_dur > "/dev/stderr";
12     }
13     if (!comp_factor) {
14         comp_factor = 1e6;       # computing factor ( -c )
15         printf "WARNING: Hardcoded comp_factor: %g\n", comp_factor > "/dev/stderr";
16     }
17     if (!comm_factor) {
18         comm_factor = 1.25e5;    # communication factor ( -C )
19         printf "WARNING: Hardcoded comm_factor: %g\n", comm_factor > "/dev/stderr";
20         printf "         comm_factor will be adjusted by ratio from exp. name\n" > "/dev/stderr";
21         adjust_comm_factor = 1;
22     }
23     if (!comp_power) {          # average computing power per node
24         comp_power = 1e9;
25         printf "WARNING: Hardcoded comp_power: %g\n", comp_power > "/dev/stderr";
26     }
27
28     if (print_overhead) {
29         printf "%-75s %11s %11s %11s %14s %11s\n", "# Experimentation",
30             "Overhead", "Comput.(1)", "Comput.(2)", "Data amnt", "Stddev";
31     } else {
32         printf "%-75s %11s %11s %14s %11s\n", "# Experimentation",
33             "Comput.(1)", "Comput.(2)", "Data amnt", "Stddev";
34     }
35 }
36
37 /^# Experiment/ {
38     next;
39 }
40
41 /^#/ {
42     print;
43     next;
44 }
45
46 {
47     total_load = $2;
48     nodes = total_load / load_per_node;
49     stddev = 100.0 * $3 / load_per_node;
50     computed = $4;
51     real_dur = $7;
52     comp_cap = comp_power * nodes;
53     theo_comp = 100.0 * computed / (theo_dur * comp_cap);
54     real_comp = 100.0 * computed / (real_dur * comp_cap);
55     if (adjust_comm_factor) {
56         # find comp/comm ratio
57         split($1, tmp, "[_/:]")
58         ratio = tmp[4] / tmp[3]
59         real_comm_factor = comm_factor * ratio;
60     } else {
61         real_comm_factor = comm_factor;
62     }
63 #    printf "# real_comm_factor: %g\n", real_comm_factor > "/dev/stderr";
64     data_total = total_load * real_comm_factor;
65     data = $5 / data_total;
66     if (print_overhead) {
67         overhead = 100.0 * (real_dur / theo_dur - 1.0);
68         printf "%-75s %11.4f %11.4f %11.4f %14.4f %11.4f\n",
69             $1, overhead, theo_comp, real_comp, data, stddev;
70     } else {
71         printf "%-75s %11.4f %11.4f %14.4f %11.4f\n",
72             $1, theo_comp, real_comp, data, stddev;
73     }
74 }