/**
* @ingroup SURF_build_api
- * @brief A library containing all known workstations
+ * @brief A library containing all known hosts
*/
xbt_lib_t host_lib;
int ROUTING_HOST_LEVEL; //Routing level
int SURF_CPU_LEVEL; //Surf cpu level
-int SURF_WKS_LEVEL; //Surf workstation level
+int SURF_HOST_LEVEL; //Surf host level
int SIMIX_HOST_LEVEL; //Simix host level
int SIMIX_STORAGE_LEVEL; //Simix storage level
int MSG_HOST_LEVEL; //Msg host level
xbt_lib_t link_lib;
int SD_LINK_LEVEL; //Simdag level
int SURF_LINK_LEVEL; //Surf level
-int NS3_LINK_LEVEL; //link for ns3
xbt_lib_t as_router_lib;
int ROUTING_ASR_LEVEL; //Routing level
/** @brief Retrieve a routing edge from its name
*
- * Routing edges are either CPU/workstation and routers, whatever
+ * Routing edges are either host and routers, whatever
*/
RoutingEdgePtr sg_routing_edge_by_name_or_null(const char *name) {
RoutingEdgePtr net_elm = (RoutingEdgePtr) xbt_lib_get_or_null(host_lib, name, ROUTING_HOST_LEVEL);
sg_platf_new_AS_begin(&AS);
((AsClusterFatTree*)current_routing)->parse_specific_arguments(cluster);
}
-
+
else{
XBT_DEBUG("<AS id=\"%s\"\trouting=\"Cluster\">", cluster->id);
AS.routing = A_surfxml_AS_routing_Cluster;
memset(&host, 0, sizeof(host));
host.id = host_id;
+ if ((cluster->properties != NULL) && (!xbt_dict_is_empty(cluster->properties))) {
+ xbt_dict_cursor_t cursor=NULL;
+ char *key,*data;
+ host.properties = xbt_dict_new();
+
+ xbt_dict_foreach(cluster->properties,cursor,key,data) {
+ xbt_dict_set(host.properties, key, xbt_strdup(data),free);
+ }
+ }
if (cluster->availability_trace && strcmp(cluster->availability_trace, "")) {
xbt_dict_set(patterns, "radical", bprintf("%d", i), NULL);
char *avail_file = xbt_str_varsubst(cluster->availability_trace, patterns);
} else {
XBT_DEBUG("\tstate_file=\"\"");
}
-
+
xbt_dynar_t power_state_list = xbt_dynar_new(sizeof(double), NULL);
xbt_dynar_push(power_state_list,&cluster->power);
host.power_peak = power_state_list;
xbt_dynar_free(&radical_ends);
}
xbt_dynar_free(&radical_elements);
-
+
// For fat trees, the links must be created once all nodes have been added
if(cluster->topology == SURF_CLUSTER_FAT_TREE) {
((AsClusterFatTree*)current_routing)->create_links();
sg_platf_trace_add_cb(routing_parse_trace);
sg_platf_trace_connect_add_cb(routing_parse_trace_connect);
-#ifdef HAVE_TRACING
instr_routing_define_callbacks();
-#endif
}
/**
void surf_AS_get_graph(AS_t as, xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges) {
as->getGraph(graph, nodes, edges);
}
-