X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/917aef7fa18957ea33a3cd78ab61b5837b5e1663..7db1335adf1a0bf50ca6055fc86be528423c1844:/src/surf/surfxml_parse.c diff --git a/src/surf/surfxml_parse.c b/src/surf/surfxml_parse.c index ff091ec252..ab38ab28ff 100644 --- a/src/surf/surfxml_parse.c +++ b/src/surf/surfxml_parse.c @@ -298,6 +298,7 @@ static xbt_dynar_t surf_parsed_filename_stack = NULL; void STag_surfxml_include(void) { + parse_after_config(); XBT_DEBUG("STag_surfxml_include '%s'",A_surfxml_include_file); xbt_dynar_push(surf_parsed_filename_stack,&surf_parsed_filename); // save old file name surf_parsed_filename = xbt_strdup(A_surfxml_include_file); @@ -419,8 +420,8 @@ void STag_surfxml_prop(void) } else{ if (!current_property_set) - current_property_set = xbt_dict_new_homogeneous(xbt_free_f); // Maybe, it should raise an error - xbt_dict_set(current_property_set, A_surfxml_prop_id, xbt_strdup(A_surfxml_prop_value), NULL); + current_property_set = xbt_dict_new(); // Maybe, it should raise an error + xbt_dict_set(current_property_set, A_surfxml_prop_id, xbt_strdup(A_surfxml_prop_value), xbt_free); } } @@ -529,6 +530,9 @@ void ETag_surfxml_cluster(void){ case A_surfxml_cluster_topology_TORUS: cluster.topology= SURF_CLUSTER_TORUS ; break; + case A_surfxml_cluster_topology_FAT___TREE: + cluster.topology = SURF_CLUSTER_FAT_TREE; + break; default: surf_parse_error("Invalid cluster topology for cluster %s", cluster.id); @@ -568,15 +572,17 @@ void ETag_surfxml_cluster(void){ cluster.availability_trace = A_surfxml_cluster_availability___file; cluster.state_trace = A_surfxml_cluster_state___file; sg_platf_new_cluster(&cluster); - + current_property_set = NULL; } -void STag_surfxml_cluster(void){ +void STag_surfxml_cluster(void){ + parse_after_config(); xbt_assert(current_property_set == NULL, "Someone forgot to reset the property set to NULL in its closing tag (or XML malformed)"); } void STag_surfxml_cabinet(void){ + parse_after_config(); s_sg_platf_cabinet_cbarg_t cabinet; memset(&cabinet,0,sizeof(cabinet)); cabinet.id = A_surfxml_cabinet_id; @@ -591,6 +597,7 @@ void STag_surfxml_cabinet(void){ } void STag_surfxml_peer(void){ + parse_after_config(); s_sg_platf_peer_cbarg_t peer; memset(&peer,0,sizeof(peer)); peer.id = A_surfxml_peer_id; @@ -832,6 +839,7 @@ void ETag_surfxml_trace(void){ } void STag_surfxml_trace___connect(void){ + parse_after_config(); s_sg_platf_trace_connect_cbarg_t trace_connect; memset(&trace_connect,0,sizeof(trace_connect)); @@ -860,6 +868,7 @@ void STag_surfxml_trace___connect(void){ } void STag_surfxml_AS(void){ + parse_after_config(); AS_TAG = 1; s_sg_platf_AS_cbarg_t AS = SG_PLATF_AS_INITIALIZER; AS.id = A_surfxml_AS_id; @@ -906,6 +915,7 @@ void ETag_surfxml_config(void){ free(cfg); } XBT_DEBUG("End configuration name = %s",A_surfxml_config_id); + xbt_dict_free(¤t_property_set); current_property_set = NULL; } @@ -982,7 +992,7 @@ void ETag_surfxml_prop(void){} void STag_surfxml_random(void){} void ETag_surfxml_random(void){} void ETag_surfxml_trace___connect(void){} -void STag_surfxml_trace(void){} +void STag_surfxml_trace(void){parse_after_config();} void ETag_surfxml_router(void){} void ETag_surfxml_host___link(void){} void ETag_surfxml_cabinet(void){}