8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/pwrake/misc/mcgp.rb', line 8
def graph_partition(host_map, target=nil)
t1 = Pwrake.clock
wgts = host_map.group_weight_sum
if wgts.size > 1
list = wgts.size.times.to_a
g = GraphTracerGroup.new([list],[wgts])
trace(g,target)
g.part_graph
end
list = host_map.group_hosts
wgts = host_map.group_core_weight
g = GraphTracerNode.new(list,wgts)
trace(g,target)
g.part_graph
t2 = Pwrake.clock
Pwrake::Log.info "Time for TOTAL Graph Partitioning: #{t2-t1} sec"
end
|