- for(i=0; i<task->workstation_nb; i++) {
- char *hostname = (char*)surf_resource_name(task->workstation_list[i]->surf_workstation);
- xbt_dynar_push(host_list, &hostname);
- }
+ for(i=0; i<task->workstation_nb; i++) {
+ char *hostname = (char*)surf_resource_name(task->workstation_list[i]->surf_workstation);
+ xbt_dynar_push(host_list, &hostname);
+ }
- jed_simgrid_container_t current_container) {
- xbt_dict_cursor_t cursor = NULL;
- unsigned int dynar_cursor;
- char *key;
- AS_t elem;
- sg_routing_edge_t network_elem;
-
- if(xbt_dict_is_empty(current_comp->routing_sons)) {
- // I am no AS
- // add hosts to jedule platform
- xbt_dynar_t hosts;
-
- hosts = xbt_dynar_new(sizeof(char*), NULL);
-
- xbt_dynar_foreach(current_comp->index_network_elm,
- dynar_cursor, network_elem) {
- char *hostname;
- hostname = strdup(network_elem->name);
- xbt_dynar_push(hosts, &hostname);
- }
-
- jed_simgrid_add_resources(current_container, hosts);
-
- } else {
- xbt_dict_foreach(current_comp->routing_sons, cursor, key, elem) {
- jed_simgrid_container_t child_container;
- jed_simgrid_create_container(&child_container, elem->name);
- jed_simgrid_add_container(current_container, child_container);
- XBT_DEBUG("name : %s\n", elem->name);
- create_hierarchy(elem, child_container);
- }
- }
+ jed_simgrid_container_t current_container) {
+ xbt_dict_cursor_t cursor = NULL;
+ unsigned int dynar_cursor;
+ char *key;
+ AS_t elem;
+ sg_routing_edge_t network_elem;
+
+ if(xbt_dict_is_empty(current_comp->routing_sons)) {
+ // I am no AS
+ // add hosts to jedule platform
+ xbt_dynar_t hosts;
+
+ hosts = xbt_dynar_new(sizeof(char*), NULL);
+
+ xbt_dynar_foreach(current_comp->index_network_elm,
+ dynar_cursor, network_elem) {
+ char *hostname;
+ hostname = strdup(network_elem->name);
+ xbt_dynar_push(hosts, &hostname);
+ }
+
+ jed_simgrid_add_resources(current_container, hosts);
+
+ } else {
+ xbt_dict_foreach(current_comp->routing_sons, cursor, key, elem) {
+ jed_simgrid_container_t child_container;
+ jed_simgrid_create_container(&child_container, elem->name);
+ jed_simgrid_add_container(current_container, child_container);
+ XBT_DEBUG("name : %s\n", elem->name);
+ create_hierarchy(elem, child_container);
+ }
+ }