From de8026e4f74d56b6b1a88e09a9dcc155525d7b6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20B=2E=20Brandenburg?= Date: Sun, 28 Mar 2010 01:40:53 -0400 Subject: Fix stupid, stupid bug that assigned some samples incorrectly to L2 sharing. --- plot_pm2.py | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'plot_pm2.py') 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 +def ludwig_l2(x, y): + # x left column, y right column, or # y left column, x, right column + return (x % 8 < 4 and x + 4 == y) or \ + (y % 8 < 4 and x - 4 == y) + +def ludwig_l3(x, y): + # same socket + # not a a shared L2 + # not identical + return (y % 4) == (x % 4) and \ + not ludwig_l2(x, y) and \ + x != y + MACHINE_TOPOLOGY = { 'jupiter-cs' : (4, [('preempt', lambda x, y: x == y), @@ -29,12 +42,8 @@ MACHINE_TOPOLOGY = { # |16,20| |17,21| |18,22| |19,23| # ------- ------- ------- ------- 'ludwig.cs.unc.edu' : (24, [('preempt', lambda x, y: x == y), - ('l2', - lambda x, y: abs(y - x) == 4), - ('l3', - lambda x, y: - abs(y - x) > 4 and \ - abs(y - x) % 4 == 0), + ('l2', ludwig_l2), + ('l3', ludwig_l3), ('mem', lambda x, y: abs(y - x) % 4 != 0)]) } -- cgit v1.2.2