Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
mstorage was never implemented anyway
[simgrid.git] / src / surf / xml / surfxml_sax_cb.cpp
index 6d1612d..e1499de 100644 (file)
@@ -20,8 +20,7 @@
 
 #include "src/surf/xml/platf_private.hpp"
 
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_parse, surf,
-                                "Logging specific to the SURF parsing module");
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_parse, surf, "Logging specific to the SURF parsing module");
 #undef CLEANUP
 int ETag_surfxml_include_state(void);
 
@@ -286,19 +285,6 @@ void ETag_surfxml_storage___type(void)
   current_property_set       = nullptr;
   current_model_property_set = nullptr;
 }
-void STag_surfxml_mstorage(void)
-{
-  XBT_DEBUG("STag_surfxml_mstorage");
-}
-void ETag_surfxml_mstorage(void)
-{
-  s_sg_platf_mstorage_cbarg_t mstorage = SG_PLATF_MSTORAGE_INITIALIZER;
-  memset(&mstorage,0,sizeof(mstorage));
-
-  mstorage.name    = A_surfxml_mstorage_name;
-  mstorage.type_id = A_surfxml_mstorage_typeId;
-  sg_platf_new_mstorage(&mstorage);
-}
 void STag_surfxml_mount(void)
 {
   XBT_DEBUG("STag_surfxml_mount");
@@ -456,10 +442,10 @@ void ETag_surfxml_host(void)    {
 
   buf = A_surfxml_host_speed;
   XBT_DEBUG("Buffer: %s", buf);
-  host.speed_peak = xbt_dynar_new(sizeof(double), nullptr);
+  host.speed_per_pstate = xbt_dynar_new(sizeof(double), nullptr);
   if (strchr(buf, ',') == nullptr){
     double speed = surf_parse_get_speed(A_surfxml_host_speed,"speed of host", host.id);
-    xbt_dynar_push_as(host.speed_peak,double, speed);
+    xbt_dynar_push_as(host.speed_per_pstate,double, speed);
   }
   else {
     xbt_dynar_t pstate_list = xbt_str_split(buf, ",");
@@ -471,7 +457,7 @@ void ETag_surfxml_host(void)    {
       xbt_dynar_get_cpy(pstate_list, i, &speed_str);
       xbt_str_trim(speed_str, nullptr);
       speed = surf_parse_get_speed(speed_str,"speed of host", host.id);
-      xbt_dynar_push_as(host.speed_peak, double, speed);
+      xbt_dynar_push_as(host.speed_per_pstate, double, speed);
       XBT_DEBUG("Speed value: %f", speed);
     }
     xbt_dynar_free(&pstate_list);
@@ -479,13 +465,13 @@ 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;
 
   sg_platf_new_host(&host);
-  xbt_dynar_free(&host.speed_peak);
+  xbt_dynar_free(&host.speed_per_pstate);
   current_property_set = nullptr;
 }
 
@@ -617,8 +603,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);
 }
@@ -635,10 +621,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:
@@ -992,9 +978,6 @@ void STag_surfxml_model___prop(void){
   xbt_dict_set(current_model_property_set, A_surfxml_model___prop_id, xbt_strdup(A_surfxml_model___prop_value), nullptr);
 }
 
-void STag_surfxml_gpu(void) {}
-void ETag_surfxml_gpu(void) {}
-
 /* nothing to do in those functions */
 void ETag_surfxml_prop(void){}
 void STag_surfxml_random(void){}