Commit c0419958 authored by Robert Ricci's avatar Robert Ricci

Fix a bookkeeping bug in the ptop parsers - all of them

Fix a bug where the total bandwidth for pnodes that are directly
connected (without an intervening switch) is not kept track of
correctly.

Originally introduced into parse_ptop.cc, and spread to the other
parsers via copy and paste.
parent c08130dc
......@@ -643,6 +643,12 @@ bool populate_links(DOMElement *root, tb_pgraph &pg, tb_sgraph &sg,
src_pnode->switches.insert(dst_vertex);
#ifdef PER_VNODE_TT
src_pnode->total_bandwidth += bandwidth;
#endif
} else {
// Neither is a switch - a direct node->node link
#ifdef PER_VNODE_TT
dst_pnode->total_bandwidth += bandwidth;
src_pnode->total_bandwidth += bandwidth;
#endif
}
......
......@@ -322,7 +322,13 @@ int parse_ptop(tb_pgraph &pg, tb_sgraph &sg, istream& input)
#ifdef PER_VNODE_TT
srcnode->total_bandwidth += ibw;
#endif
}
} else {
// Neither is a switch - a direct node->node link
#ifdef PER_VNODE_TT
dstnode->total_bandwidth += ibw;
srcnode->total_bandwidth += ibw;
#endif
}
}
} else if (command == "set-type-limit") {
if (parsed_line.size() != 3) {
......
......@@ -471,7 +471,13 @@ bool populate_links(DOMElement *root, tb_pgraph &pg, tb_sgraph &sg) {
#ifdef PER_VNODE_TT
src_pnode->total_bandwidth += bandwidth.i();
#endif
}
} else {
// Neither is a switch - a direct node->node link
#ifdef PER_VNODE_TT
dst_pnode->total_bandwidth += bandwidth.i();
src_pnode->total_bandwidth += bandwidth.i();
#endif
}
//XMLDEBUG("created link " << *phys_link << endl);
// XXX: Special treatment for switches
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment