diff options
Diffstat (limited to 'plot_pm2.py')
-rwxr-xr-x | plot_pm2.py | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/plot_pm2.py b/plot_pm2.py index 40e6a63..c2fcbf3 100755 --- a/plot_pm2.py +++ b/plot_pm2.py | |||
@@ -17,6 +17,19 @@ from gnuplot import gnuplot, FileGraph, FORMATS | |||
17 | 17 | ||
18 | 18 | ||
19 | 19 | ||
20 | def ludwig_l2(x, y): | ||
21 | # x left column, y right column, or # y left column, x, right column | ||
22 | return (x % 8 < 4 and x + 4 == y) or \ | ||
23 | (y % 8 < 4 and x - 4 == y) | ||
24 | |||
25 | def ludwig_l3(x, y): | ||
26 | # same socket | ||
27 | # not a a shared L2 | ||
28 | # not identical | ||
29 | return (y % 4) == (x % 4) and \ | ||
30 | not ludwig_l2(x, y) and \ | ||
31 | x != y | ||
32 | |||
20 | 33 | ||
21 | MACHINE_TOPOLOGY = { | 34 | MACHINE_TOPOLOGY = { |
22 | 'jupiter-cs' : (4, [('preempt', lambda x, y: x == y), | 35 | 'jupiter-cs' : (4, [('preempt', lambda x, y: x == y), |
@@ -29,12 +42,8 @@ MACHINE_TOPOLOGY = { | |||
29 | # |16,20| |17,21| |18,22| |19,23| | 42 | # |16,20| |17,21| |18,22| |19,23| |
30 | # ------- ------- ------- ------- | 43 | # ------- ------- ------- ------- |
31 | 'ludwig.cs.unc.edu' : (24, [('preempt', lambda x, y: x == y), | 44 | 'ludwig.cs.unc.edu' : (24, [('preempt', lambda x, y: x == y), |
32 | ('l2', | 45 | ('l2', ludwig_l2), |
33 | lambda x, y: abs(y - x) == 4), | 46 | ('l3', ludwig_l3), |
34 | ('l3', | ||
35 | lambda x, y: | ||
36 | abs(y - x) > 4 and \ | ||
37 | abs(y - x) % 4 == 0), | ||
38 | ('mem', lambda x, y: abs(y - x) % 4 != 0)]) | 47 | ('mem', lambda x, y: abs(y - x) % 4 != 0)]) |
39 | } | 48 | } |
40 | 49 | ||