X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/eff3b8aba0af43e3294a007d806867641ec6d3b6..35c72c8925a6eeca0d5d1b651606ff17a609db95:/src/surf/surfxml_parse.c diff --git a/src/surf/surfxml_parse.c b/src/surf/surfxml_parse.c index 48cb08d5ae..8967099e89 100644 --- a/src/surf/surfxml_parse.c +++ b/src/surf/surfxml_parse.c @@ -709,7 +709,6 @@ static void parse_host_foreach(void){ const char *surfxml_host_availability_file = A_surfxml_host_availability_file; const char *surfxml_host_state_file = A_surfxml_host_state_file; - xbt_dict_t cluster_host_props = current_property_set; names = xbt_dict_get_or_null(set_list, foreach_set_name); @@ -1167,6 +1166,9 @@ static void add_randomness(void) xbt_dict_set(random_data_list, random_id, (void *) random, NULL); } +/** + * create CPU resource via CPU Model + */ void surf_host_create_resource(char *name, double power_peak, double power_scale, tmgr_trace_t power_trace, @@ -1178,16 +1180,61 @@ void surf_host_create_resource(char *name, double power_peak, create_resource(name,power_peak,power_scale,power_trace,state_initial,state_trace,cpu_properties); } +/* + * create CPU resource via worsktation_ptask_L07 model + */ -void surf_link_create_resouce(char *name, +void surf_wsL07_host_create_resource(char *name, double power_peak, + double power_scale, + tmgr_trace_t power_trace, + e_surf_resource_state_t state_initial, + tmgr_trace_t state_trace, + xbt_dict_t cpu_properties) +{ + surf_workstation_model->extension.workstation. + cpu_create_resource(name,power_peak,power_scale,power_trace,state_initial,state_trace,cpu_properties); +} +/* + * create link resource via network Model + */ +void surf_link_create_resource(char *name, double bw_initial, - double lat_initial) + tmgr_trace_t bw_trace, + double lat_initial, + tmgr_trace_t lat_trace, + e_surf_resource_state_t + state_initial, + tmgr_trace_t state_trace, + e_surf_link_sharing_policy_t policy, + xbt_dict_t properties) { return surf_network_model->extension.network. - create_resource(name,bw_initial,lat_initial); + create_resource(name,bw_initial,bw_trace,lat_initial,lat_trace, + state_initial,state_trace,policy,properties); + +} + +/* + * create link resource via workstation_ptask_L07 model + */ +void surf_wsL07_link_create_resource(char *name, + double bw_initial, + tmgr_trace_t bw_trace, + double lat_initial, + tmgr_trace_t lat_trace, + e_surf_resource_state_t + state_initial, + tmgr_trace_t state_trace, + e_surf_link_sharing_policy_t + policy, xbt_dict_t properties) +{ + return surf_workstation_model->extension.workstation. + link_create_resource(name,bw_initial,bw_trace,lat_initial,lat_trace, + state_initial,state_trace,policy,properties); } + /** * Route: add route element bypassing the parser : * same job as parse_route_elem @@ -1205,7 +1252,7 @@ void surf_add_route_element(char* link_ctn_id) void surf_route_set_resource(char *source_id,char *destination_id,xbt_dynar_t links_id,int action) { route_link_list = xbt_dynar_new(sizeof(char *), NULL); - routing_set_route(source_id,destination_id,links_id,action); + routing_add_route(source_id,destination_id,links_id,action); } @@ -1216,3 +1263,32 @@ void surf_route_add_host(char *host_id) { routing_add_host(host_id); } + +/* + * Add Traces + */ +void surf_add_host_traces(void) +{ + return surf_cpu_model->extension.cpu. + add_traces(); +} + +void surf_add_link_traces(void) +{ + return surf_network_model->extension.network. + add_traces(); +} + +void surf_wsL07_add_traces(void) +{ + return surf_workstation_model->extension.workstation. + add_traces(); +} +/** + * set routes + */ +void surf_set_routes(void) +{ + routing_set_routes(); +} +