Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
further objectifies the traces
[simgrid.git] / src / surf / xml / surfxml_sax_cb.cpp
index 4640bf074ea28e947318d083217496bc30dee91a..d98e65ebd3a252d030019c475f5c2bd69f9ee15b 100644 (file)
@@ -478,8 +478,8 @@ void ETag_surfxml_host(void)    {
 
   XBT_DEBUG("pstate: %s", A_surfxml_host_pstate);
   host.core_amount = surf_parse_get_int(A_surfxml_host_core);
-  host.speed_trace = tmgr_trace_new_from_file(A_surfxml_host_availability___file);
-  host.state_trace = tmgr_trace_new_from_file(A_surfxml_host_state___file);
+  host.speed_trace = A_surfxml_host_availability___file[0] ? tmgr_trace_new_from_file(A_surfxml_host_availability___file) : NULL;
+  host.state_trace = A_surfxml_host_state___file[0] ? tmgr_trace_new_from_file(A_surfxml_host_state___file) : NULL;
   host.pstate      = surf_parse_get_int(A_surfxml_host_pstate);
   host.coord       = A_surfxml_host_coordinates;
 
@@ -616,8 +616,8 @@ void STag_surfxml_peer(void){
   peer.bw_out             = surf_parse_get_bandwidth(A_surfxml_peer_bw___out, "bw_out of peer", peer.id);
   peer.lat                = surf_parse_get_time(A_surfxml_peer_lat, "lat of peer", peer.id);
   peer.coord              = A_surfxml_peer_coordinates;
-  peer.availability_trace = tmgr_trace_new_from_file(A_surfxml_peer_availability___file);
-  peer.state_trace        = tmgr_trace_new_from_file(A_surfxml_peer_state___file);
+  peer.availability_trace = A_surfxml_peer_availability___file[0] ? tmgr_trace_new_from_file(A_surfxml_peer_availability___file) : NULL;
+  peer.state_trace        = A_surfxml_peer_state___file[0] ? tmgr_trace_new_from_file(A_surfxml_peer_state___file) : NULL;
 
   sg_platf_new_peer(&peer);
 }
@@ -634,10 +634,10 @@ void ETag_surfxml_link(void){
   link.properties          = current_property_set;
   link.id                  = A_surfxml_link_id;
   link.bandwidth           = surf_parse_get_bandwidth(A_surfxml_link_bandwidth, "bandwidth of link", link.id);
-  link.bandwidth_trace     = tmgr_trace_new_from_file(A_surfxml_link_bandwidth___file);
+  link.bandwidth_trace     = A_surfxml_link_bandwidth___file[0] ? tmgr_trace_new_from_file(A_surfxml_link_bandwidth___file) : NULL;
   link.latency             = surf_parse_get_time(A_surfxml_link_latency, "latency of link", link.id);
-  link.latency_trace       = tmgr_trace_new_from_file(A_surfxml_link_latency___file);
-  link.state_trace         = tmgr_trace_new_from_file(A_surfxml_link_state___file);
+  link.latency_trace       = A_surfxml_link_latency___file[0] ? tmgr_trace_new_from_file(A_surfxml_link_latency___file) : NULL;
+  link.state_trace         = A_surfxml_link_state___file[0] ? tmgr_trace_new_from_file(A_surfxml_link_state___file):NULL;
 
   switch (A_surfxml_link_sharing___policy) {
   case A_surfxml_link_sharing___policy_SHARED: