aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorUlas Kozat <ulas.kozat@gmail.com>2016-11-18 12:08:14 -0800
committerUlas Kozat <ulas.kozat@gmail.com>2016-11-18 12:08:32 -0800
commitd8fdb16bbd33e6706a1fc8ca7f2493984f83027e (patch)
tree0d320c86afe65d3b1a0ec1348e1f61b1c088f09c /lib
parent825ff565d9ebebe06f915c977bf8782fcc9de8fa (diff)
Bug fix in max-packing scheduler logic
Change-Id: I07aef0c3942d3f76e0accb5cfc16d6f087ab3f92 Signed-off-by: Ulas Kozat <ulas.kozat@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/mapper/label.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/mapper/label.py b/lib/mapper/label.py
index 3298aea..02e2a18 100644
--- a/lib/mapper/label.py
+++ b/lib/mapper/label.py
@@ -77,9 +77,10 @@ def select_site( site_map ):
maxval = counter[site]
maxkey = site
elif counter.has_key(site) == False:
- counter[site] = 1
+ counter[site] = 0
if maxval == 0:
maxval = 1
maxkey = site
- node_site[node] = maxkey
+ node_site[node] = maxkey
+ counter[node_site[node]] = counter[node_site[node]] + 1
return node_site