X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/8a80a7488d5a9c1b57d287f939a310ee63c27583..272ccad1b68b6d9c17069f3c934886925bb15b5d:/teshsuite/simdag/platforms/flatifier.c diff --git a/teshsuite/simdag/platforms/flatifier.c b/teshsuite/simdag/platforms/flatifier.c index 4ec7ebdd35..c2e576d7cf 100644 --- a/teshsuite/simdag/platforms/flatifier.c +++ b/teshsuite/simdag/platforms/flatifier.c @@ -102,11 +102,11 @@ int main(int argc, char **argv) // Routers xbt_lib_foreach(as_router_lib, cursor_src, key, value1) { - if(((sg_routing_edge_t)xbt_lib_get_or_null(as_router_lib, key, - ROUTING_ASR_LEVEL))->rc_type == SURF_NETWORK_ELEMENT_ROUTER) - { - printf(" \n",key); - } + if(((sg_routing_edge_t)xbt_lib_get_or_null(as_router_lib, key, + ROUTING_ASR_LEVEL))->rc_type == SURF_NETWORK_ELEMENT_ROUTER) + { + printf(" \n",key); + } } // Links @@ -133,88 +133,88 @@ int main(int argc, char **argv) xbt_lib_foreach(host_lib, cursor_src, src, value1) // Routes from host { value1 = xbt_lib_get_or_null(host_lib,src,ROUTING_HOST_LEVEL); - xbt_lib_foreach(host_lib, cursor_dst, dst, value2) //to host - { - printf(" \n " - ,src - ,dst); - xbt_dynar_t route=NULL; - value2 = xbt_lib_get_or_null(host_lib,dst,ROUTING_HOST_LEVEL); - routing_get_route_and_latency(value1,value2,&route,NULL); - for(i=0;iname); - printf("",link_name); - free(link_name); - } - printf("\n \n"); - } - xbt_lib_foreach(as_router_lib, cursor_dst, dst, value2) //to router - { - if(routing_get_network_element_type(dst) == SURF_NETWORK_ELEMENT_ROUTER){ - printf(" \n " - ,src - ,dst); - xbt_dynar_t route=NULL; - value2 = xbt_lib_get_or_null(as_router_lib,dst,ROUTING_ASR_LEVEL); - routing_get_route_and_latency((sg_routing_edge_t)value1,(sg_routing_edge_t)value2,&route,NULL); - for(i=0;iname); - printf("",link_name); - free(link_name); - } - printf("\n \n"); - } - } + xbt_lib_foreach(host_lib, cursor_dst, dst, value2) //to host + { + printf(" \n " + ,src + ,dst); + xbt_dynar_t route=NULL; + value2 = xbt_lib_get_or_null(host_lib,dst,ROUTING_HOST_LEVEL); + routing_get_route_and_latency(value1,value2,&route,NULL); + for(i=0;iname); + printf("",link_name); + free(link_name); + } + printf("\n \n"); + } + xbt_lib_foreach(as_router_lib, cursor_dst, dst, value2) //to router + { + if(routing_get_network_element_type(dst) == SURF_NETWORK_ELEMENT_ROUTER){ + printf(" \n " + ,src + ,dst); + xbt_dynar_t route=NULL; + value2 = xbt_lib_get_or_null(as_router_lib,dst,ROUTING_ASR_LEVEL); + routing_get_route_and_latency((sg_routing_edge_t)value1,(sg_routing_edge_t)value2,&route,NULL); + for(i=0;iname); + printf("",link_name); + free(link_name); + } + printf("\n \n"); + } + } } xbt_lib_foreach(as_router_lib, cursor_src, src, value1) // Routes from router { value1 = xbt_lib_get_or_null(as_router_lib,src,ROUTING_ASR_LEVEL); - if(routing_get_network_element_type(src) == SURF_NETWORK_ELEMENT_ROUTER){ - xbt_lib_foreach(as_router_lib, cursor_dst, dst, value2) //to router - { - if(routing_get_network_element_type(dst) == SURF_NETWORK_ELEMENT_ROUTER){ - printf(" \n " - ,src - ,dst); - xbt_dynar_t route=NULL; - value2 = xbt_lib_get_or_null(as_router_lib,dst,ROUTING_ASR_LEVEL); - routing_get_route_and_latency((sg_routing_edge_t)value1,(sg_routing_edge_t)value2,&route,NULL); - for(i=0;iname); - printf("",link_name); - free(link_name); - } - printf("\n \n"); - } - } - xbt_lib_foreach(host_lib, cursor_dst, dst, value2) //to host - { - printf(" \n " - ,src, dst); - xbt_dynar_t route=NULL; - value2 = xbt_lib_get_or_null(host_lib,dst,ROUTING_HOST_LEVEL); - routing_get_route_and_latency((sg_routing_edge_t)value1,(sg_routing_edge_t)value2,&route, NULL); - for(i=0;iname); - printf("",link_name); - free(link_name); - } - printf("\n \n"); - } - } + if(routing_get_network_element_type(src) == SURF_NETWORK_ELEMENT_ROUTER){ + xbt_lib_foreach(as_router_lib, cursor_dst, dst, value2) //to router + { + if(routing_get_network_element_type(dst) == SURF_NETWORK_ELEMENT_ROUTER){ + printf(" \n " + ,src + ,dst); + xbt_dynar_t route=NULL; + value2 = xbt_lib_get_or_null(as_router_lib,dst,ROUTING_ASR_LEVEL); + routing_get_route_and_latency((sg_routing_edge_t)value1,(sg_routing_edge_t)value2,&route,NULL); + for(i=0;iname); + printf("",link_name); + free(link_name); + } + printf("\n \n"); + } + } + xbt_lib_foreach(host_lib, cursor_dst, dst, value2) //to host + { + printf(" \n " + ,src, dst); + xbt_dynar_t route=NULL; + value2 = xbt_lib_get_or_null(host_lib,dst,ROUTING_HOST_LEVEL); + routing_get_route_and_latency((sg_routing_edge_t)value1,(sg_routing_edge_t)value2,&route, NULL); + for(i=0;iname); + printf("",link_name); + free(link_name); + } + printf("\n \n"); + } + } } printf("\n");