From: Jonathan Rouzaud-Cornabas Date: Thu, 14 Feb 2013 13:26:18 +0000 (+0100) Subject: Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid X-Git-Tag: v3_9_90~491^2~30 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/aed1b063616b74c01728a773558532e89a5c7df7?hp=b0f9d49042d5ded62d3f2b46a1cc25db18ca60fd Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid --- diff --git a/examples/simdag/test_simdag_tracing.tesh b/examples/simdag/test_simdag_tracing.tesh index b41312661a..f4e160a717 100644 --- a/examples/simdag/test_simdag_tracing.tesh +++ b/examples/simdag/test_simdag_tracing.tesh @@ -157,9 +157,9 @@ $ tail -n +3 ./simgrid.trace > 6 0 23 3 0 "13" > 6 0 24 3 0 "10" > 6 0 25 3 0 "5" -> 4 6 0 1 3 0-HOST1-LINK3 -> 4 7 0 3 3 0-LINK3-LINK3 -> 4 8 0 3 1 0-LINK3-HOST1 +> 4 6 0 3 3 0-LINK3-LINK3 +> 4 7 0 3 1 0-LINK3-HOST1 +> 4 8 0 1 3 0-HOST1-LINK3 > 8 0 2 1 5000000000.000000 > 8 0 2 2 1000000000.000000 > 8 0 2 3 5000000000.000000 @@ -200,54 +200,54 @@ $ tail -n +3 ./simgrid.trace > 8 0 5 24 0.000100 > 8 0 4 25 125000000.000000 > 8 0 5 25 0.000100 -> 15 0 6 0 topology 10 0 -> 16 0 6 0 topology 25 0 -> 15 0 7 0 topology 25 1 -> 16 0 7 0 topology 12 1 -> 15 0 7 0 topology 12 2 -> 16 0 7 0 topology 11 2 -> 15 0 8 0 topology 11 3 -> 16 0 8 0 topology 1 3 -> 15 0 7 0 topology 12 4 -> 16 0 7 0 topology 14 4 -> 15 0 8 0 topology 14 5 -> 16 0 8 0 topology 3 5 -> 15 0 7 0 topology 12 6 -> 16 0 7 0 topology 19 6 -> 15 0 8 0 topology 19 7 -> 16 0 8 0 topology 6 7 -> 15 0 7 0 topology 12 8 -> 16 0 7 0 topology 15 8 -> 15 0 8 0 topology 15 9 -> 16 0 8 0 topology 4 9 -> 15 0 7 0 topology 12 10 -> 16 0 7 0 topology 23 10 -> 15 0 7 0 topology 23 11 -> 16 0 7 0 topology 18 11 -> 15 0 7 0 topology 18 12 -> 16 0 7 0 topology 16 12 -> 15 0 7 0 topology 16 13 -> 16 0 7 0 topology 24 13 -> 15 0 7 0 topology 24 14 -> 16 0 7 0 topology 22 14 -> 15 0 8 0 topology 22 15 -> 16 0 8 0 topology 9 15 -> 15 0 7 0 topology 24 16 -> 16 0 7 0 topology 20 16 -> 15 0 8 0 topology 20 17 -> 16 0 8 0 topology 7 17 -> 15 0 7 0 topology 24 18 -> 16 0 7 0 topology 17 18 -> 15 0 8 0 topology 17 19 -> 16 0 8 0 topology 5 19 -> 15 0 7 0 topology 24 20 -> 16 0 7 0 topology 13 20 -> 15 0 8 0 topology 13 21 -> 16 0 8 0 topology 2 21 -> 15 0 7 0 topology 24 22 -> 16 0 7 0 topology 21 22 -> 15 0 8 0 topology 21 23 -> 16 0 8 0 topology 8 23 +> 15 0 6 0 topology 12 0 +> 16 0 6 0 topology 23 0 +> 15 0 6 0 topology 24 1 +> 16 0 6 0 topology 22 1 +> 15 0 6 0 topology 24 2 +> 16 0 6 0 topology 17 2 +> 15 0 6 0 topology 24 3 +> 16 0 6 0 topology 21 3 +> 15 0 7 0 topology 13 4 +> 16 0 7 0 topology 2 4 +> 15 0 6 0 topology 12 5 +> 16 0 6 0 topology 19 5 +> 15 0 7 0 topology 14 6 +> 16 0 7 0 topology 3 6 +> 15 0 7 0 topology 22 7 +> 16 0 7 0 topology 9 7 +> 15 0 7 0 topology 21 8 +> 16 0 7 0 topology 8 8 +> 15 0 8 0 topology 1 9 +> 16 0 8 0 topology 11 9 +> 15 0 7 0 topology 19 10 +> 16 0 7 0 topology 6 10 +> 15 0 6 0 topology 16 11 +> 16 0 6 0 topology 24 11 +> 15 0 6 0 topology 18 12 +> 16 0 6 0 topology 16 12 +> 15 0 6 0 topology 23 13 +> 16 0 6 0 topology 18 13 +> 15 0 6 0 topology 24 14 +> 16 0 6 0 topology 20 14 +> 15 0 7 0 topology 20 15 +> 16 0 7 0 topology 7 15 +> 15 0 6 0 topology 24 16 +> 16 0 6 0 topology 13 16 +> 15 0 6 0 topology 12 17 +> 16 0 6 0 topology 25 17 +> 15 0 6 0 topology 11 18 +> 16 0 6 0 topology 12 18 +> 15 0 6 0 topology 12 19 +> 16 0 6 0 topology 14 19 +> 15 0 6 0 topology 12 20 +> 16 0 6 0 topology 15 20 +> 15 0 7 0 topology 25 21 +> 16 0 7 0 topology 10 21 +> 15 0 7 0 topology 15 22 +> 16 0 7 0 topology 4 22 +> 15 0 7 0 topology 17 23 +> 16 0 7 0 topology 5 23 > 1 9 3 bCOMP_SEQ "0.800026 0.545312 0.857926" > 1 10 1 pCOMP_SEQ "0.800026 0.545312 0.857926" > 1 11 3 bCOMM_E2E "0.904944 0.089118 0.069832" diff --git a/src/surf/instr_routing.c b/src/surf/instr_routing.c index 285a03b1bd..e4be277883 100644 --- a/src/surf/instr_routing.c +++ b/src/surf/instr_routing.c @@ -14,8 +14,6 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_routing, instr, "Tracing platform hierarchy"); -extern xbt_dict_t defined_types; /* from instr_interface.c */ - static int platform_created = 0; /* indicate whether the platform file has been traced */ static xbt_dynar_t currentContainer = NULL; /* push and pop, used only in creation */ @@ -145,7 +143,7 @@ static int graph_extraction_filter_out (container_t c1, container_t c2) static void recursiveGraphExtraction (AS_t rc, container_t container, xbt_dict_t filter) { if (!TRACE_platform_topology()){ - XBT_DEBUG("Graph extracing disable by user."); + XBT_DEBUG("Graph extraction disabled by user."); return; } XBT_DEBUG ("Graph extraction for routing_component = %s", rc->name); @@ -161,7 +159,7 @@ static void recursiveGraphExtraction (AS_t rc, container_t container, xbt_dict_t } { - xbt_graph_t graph = xbt_graph_new_graph (0, NULL); + xbt_graph_t graph = xbt_graph_new_graph (0, NULL); xbt_dict_t nodes = xbt_dict_new_homogeneous(NULL); xbt_dict_t edges = xbt_dict_new_homogeneous(NULL); xbt_edge_t edge = NULL; @@ -177,7 +175,6 @@ static void recursiveGraphExtraction (AS_t rc, container_t container, xbt_dict_t xbt_dict_free (&edges); xbt_graph_free_graph(graph,xbt_free, xbt_free, NULL); } - } /* diff --git a/src/surf/surf_routing_generic.c b/src/surf/surf_routing_generic.c index e6192c641e..ea3726452b 100644 --- a/src/surf/surf_routing_generic.c +++ b/src/surf/surf_routing_generic.c @@ -143,8 +143,6 @@ void generic_get_graph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges, int src, dst; int table_size = xbt_dynar_length(rc->index_network_elm); - sg_platf_route_cbarg_t route = xbt_new0(s_sg_platf_route_cbarg_t, 1); - route->link_list = xbt_dynar_new(sizeof(sg_routing_link_t), NULL); for (src = 0; src < table_size; src++) { sg_routing_edge_t my_src = @@ -155,35 +153,49 @@ void generic_get_graph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges, sg_routing_edge_t my_dst = xbt_dynar_get_as(rc->index_network_elm, dst, sg_routing_edge_t); + sg_platf_route_cbarg_t route = xbt_new0(s_sg_platf_route_cbarg_t, 1); + route->link_list = xbt_dynar_new(sizeof(sg_routing_link_t), NULL); + rc->get_route_and_latency(rc, my_src, my_dst, route, NULL); - if (route) { - unsigned int cpt; - void *link; + XBT_DEBUG ("get_route_and_latency %s -> %s", my_src->name, my_dst->name); - xbt_node_t current, previous; + unsigned int cpt; + void *link; - if (route->gw_src) { - previous = new_xbt_graph_node(graph, route->gw_src->name, nodes); - } else { - previous = new_xbt_graph_node(graph, my_src->name, nodes); - } + xbt_node_t current, previous; + const char *previous_name, *current_name; - xbt_dynar_foreach(route->link_list, cpt, link) { - char *link_name = ((surf_resource_t) link)->name; - current = new_xbt_graph_node(graph, link_name, nodes); - new_xbt_graph_edge(graph, previous, current, edges); - previous = current; - } + if (route->gw_src) { + previous = new_xbt_graph_node(graph, route->gw_src->name, nodes); + previous_name = route->gw_src->name; + } else { + previous = new_xbt_graph_node(graph, my_src->name, nodes); + previous_name = my_src->name; + } - if (route->gw_dst) { - current = new_xbt_graph_node(graph, route->gw_dst->name, nodes); - } else { - current = new_xbt_graph_node(graph, my_dst->name, nodes); - } + xbt_dynar_foreach(route->link_list, cpt, link) { + char *link_name = ((surf_resource_t) link)->name; + current = new_xbt_graph_node(graph, link_name, nodes); + current_name = link_name; new_xbt_graph_edge(graph, previous, current, edges); + XBT_DEBUG (" %s -> %s", previous_name, current_name); + previous = current; + previous_name = current_name; + } + if (route->gw_dst) { + current = new_xbt_graph_node(graph, route->gw_dst->name, nodes); + current_name = route->gw_dst->name; + } else { + current = new_xbt_graph_node(graph, my_dst->name, nodes); + current_name = my_dst->name; } + new_xbt_graph_edge(graph, previous, current, edges); + XBT_DEBUG (" %s -> %s", previous_name, current_name); + + xbt_dynar_free (&(route->link_list)); + xbt_free (route); } } }