state_trace = tmgr_trace_new(state_tr);
else
state_trace = tmgr_trace_new("");
- current_property_set = xbt_dict_new();
+
surf_host_create_resource(xbt_strdup(id), power_peak, power_scale,
power_trace, core_nb, state_initial, state_trace,
current_property_set);
+ current_property_set = NULL;
+
}
/**
state_trace = tmgr_trace_new(state_tr);
else
state_trace = tmgr_trace_new("");
- current_property_set = xbt_dict_new();
+
surf_wsL07_host_create_resource(xbt_strdup(id), power_peak, power_scale,
power_trace, state_initial, state_trace,
current_property_set);
-
+ current_property_set = NULL;
}
/**
parse_argv[(parse_argc) - 1] = xbt_strdup(A_surfxml_process_function);
surf_parse_get_double(&start_time, A_surfxml_process_start_time);
surf_parse_get_double(&kill_time, A_surfxml_process_kill_time);
-
- current_property_set = xbt_dict_new();
}
static void parse_argument(void)
}
xbt_free(parse_host);
}
+ current_property_set = NULL;
}
/**
parse_argv[(parse_argc) - 1] = xbt_strdup(process_function);
start_time = process_start_time;
kill_time = process_kill_time;
- current_property_set = xbt_dict_new();
/* add arguments */
xbt_dynar_foreach(arguments, i, arg) {
state_initial = SURF_RESOURCE_OFF;
state_trace = tmgr_trace_new(A_surfxml_host_state_file);
- current_property_set = xbt_dict_new();
cpu_new(xbt_strdup(A_surfxml_host_id), power_peak, power_scale,
power_trace, core, state_initial, state_trace, current_property_set);
-
+ current_property_set = NULL;
}
static void add_traces_cpu(void)
static void cpu_define_callbacks(const char *file)
{
- surfxml_add_callback(STag_surfxml_host_cb_list, parse_cpu_init);
+ surfxml_add_callback(ETag_surfxml_host_cb_list, parse_cpu_init);
surfxml_add_callback(ETag_surfxml_platform_cb_list, &add_traces_cpu);
}
state_initial = SURF_RESOURCE_OFF;
state_trace = tmgr_trace_new(A_surfxml_host_state_file);
- current_property_set = xbt_dict_new();
cpu_im_new(xbt_strdup(A_surfxml_host_id), power_peak, power_scale,
power_trace, core, state_initial, state_trace,
current_property_set);
+ current_property_set = NULL;
}
static void cpu_im_define_callbacks(const char *file)
{
- surfxml_add_callback(STag_surfxml_host_cb_list, parse_cpu_im_init);
+ surfxml_add_callback(ETag_surfxml_host_cb_list, parse_cpu_im_init);
surfxml_add_callback(ETag_surfxml_platform_cb_list,
&cpu_im_add_traces_cpu);
}
state_initial = SURF_RESOURCE_OFF;
state_trace = tmgr_trace_new(A_surfxml_host_state_file);
- current_property_set = xbt_dict_new();
cpu_ti_new(xbt_strdup(A_surfxml_host_id), power_peak, power_scale,
power_trace, core, state_initial, state_trace,
current_property_set);
+ current_property_set = NULL;
}
static void cpu_ti_define_callbacks(const char *file)
{
- surfxml_add_callback(STag_surfxml_host_cb_list, parse_cpu_ti_init);
+ surfxml_add_callback(ETag_surfxml_host_cb_list, parse_cpu_ti_init);
surfxml_add_callback(ETag_surfxml_platform_cb_list, &add_traces_cpu_ti);
}
if (state_trace)
XBT_INFO("The GTNetS network model doesn't support link state traces");
- current_property_set = xbt_dict_new();
if (A_surfxml_link_sharing_policy == A_surfxml_link_sharing_policy_FULLDUPLEX)
{
link_new(bprintf("%s_UP",name), bw, lat, current_property_set);
}
else link_new(name, bw, lat, current_property_set);
+ current_property_set = NULL;
}
/* Create the gtnets topology based on routing strategy */
static void define_callbacks(const char *file)
{
/* Figuring out the network links */
- surfxml_add_callback(STag_surfxml_link_cb_list, &parse_link_init);
+ surfxml_add_callback(ETag_surfxml_link_cb_list, &parse_link_init);
surfxml_add_callback(ETag_surfxml_platform_cb_list,
&create_gtnets_topology);
}
cpu->generic_resource.model = surf_workstation_model;
cpu->type = SURF_WORKSTATION_RESOURCE_CPU;
cpu->generic_resource.name = xbt_strdup(name);
- cpu->generic_resource.properties = current_property_set;
+ cpu->generic_resource.properties = cpu_properties;
cpu->id = ptask_host_count++;
cpu->power_scale = power_scale;
state_initial = SURF_RESOURCE_OFF;
state_trace = tmgr_trace_new(A_surfxml_host_state_file);
- current_property_set = xbt_dict_new();
ptask_cpu_new(A_surfxml_host_id, power_scale, power_initial, power_trace,
state_initial, state_trace, current_property_set);
+ current_property_set=NULL;
}
static void ptask_cpu_create_resource(char *name, double power_peak,
state_trace = tmgr_trace_new(A_surfxml_link_state_file);
- current_property_set = xbt_dict_new();
-
if(policy_initial_link == SURF_LINK_FULLDUPLEX)
{
ptask_link_new(name_link_up, bw_initial, bw_trace, lat_initial, lat_trace,
current_property_set);
ptask_link_new(name_link_down, bw_initial, bw_trace, lat_initial, lat_trace,
state_initial_link, state_trace, policy_initial_link,
- xbt_dict_new());
+ current_property_set);
}
else
{
state_initial_link, state_trace, policy_initial_link,
current_property_set);
}
+ current_property_set = NULL;
}
static void ptask_link_create_resource(char *name,
e_surf_link_sharing_policy_t
policy, xbt_dict_t properties)
{
-
ptask_link_new(name, bw_initial, bw_trace,
lat_initial, lat_trace, state_initial, state_trace,
- policy, xbt_dict_new());
+ policy, properties);
}
static void ptask_define_callbacks(const char *file)
{
/* Adding callback functions */
- surfxml_add_callback(STag_surfxml_host_cb_list, &ptask_parse_cpu_init);
- surfxml_add_callback(STag_surfxml_link_cb_list, &ptask_parse_link_init);
+ surfxml_add_callback(ETag_surfxml_host_cb_list, &ptask_parse_cpu_init);
+ surfxml_add_callback(ETag_surfxml_link_cb_list, &ptask_parse_link_init);
surfxml_add_callback(ETag_surfxml_platform_cb_list, &ptask_add_traces);
}