From 171757e04a3d23717194e546da923ad89af5ab7a Mon Sep 17 00:00:00 2001 From: Neil McGlohon Date: Mon, 14 May 2018 10:44:28 -0400 Subject: [PATCH] Dragonfly Plus: Local routing uses best choice --- src/networks/model-net/dragonfly-plus.C | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/networks/model-net/dragonfly-plus.C b/src/networks/model-net/dragonfly-plus.C index 96c62c6..92d54ea 100644 --- a/src/networks/model-net/dragonfly-plus.C +++ b/src/networks/model-net/dragonfly-plus.C @@ -2740,14 +2740,16 @@ static Connection do_dfp_routing(router_state *s, vector< Connection > poss_next_stops = s->connMan->get_connections_to_gid(msg->dfp_dest_terminal_id, CONN_TERMINAL); if (poss_next_stops.size() < 1) tw_error(TW_LOC, "Destination Router: No connection to destination terminal\n"); - return poss_next_stops[0]; + Connection best_min_conn = get_best_connection_from_conns(s, bf, msg, lp, poss_next_stops); + return best_min_conn; } else if (my_group_id == fdest_group_id) { //then we just route minimally vector< Connection > poss_next_stops = get_possible_stops_to_specific_router(s, bf, msg, lp, fdest_router_id); if (poss_next_stops.size() < 1) tw_error(TW_LOC, "DEAD END WHEN ROUTING LOCALLY\n"); - return poss_next_stops[0]; + Connection best_min_conn = get_best_connection_from_conns(s, bf, msg, lp, poss_next_stops); + return best_min_conn; } //------------ END LOCAL GROUP ROUTING --------- // from here we can assume that we are not in the destination group -- 2.26.2