Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix build with tracing=OFF.
[simgrid.git] / src / surf / workstation_ptask_L07.c
index 6eb1de9..662b384 100644 (file)
@@ -302,19 +302,19 @@ static void ptask_update_actions_state(double now, double delta)
                                     i++))) {
         constraint_id = lmm_constraint_id(cnst);
 
-/*     if(((link_L07_t)constraint_id)->type== */
-/*        SURF_WORKSTATION_RESOURCE_LINK) { */
-/*       XBT_DEBUG("Checking for link %s (%p)", */
-/*              ((link_L07_t)constraint_id)->name, */
-/*              ((link_L07_t)constraint_id)); */
-/*     } */
-/*     if(((cpu_L07_t)constraint_id)->type== */
-/*        SURF_WORKSTATION_RESOURCE_CPU) { */
-/*       XBT_DEBUG("Checking for cpu %s (%p) : %s", */
-/*              ((cpu_L07_t)constraint_id)->name, */
-/*              ((cpu_L07_t)constraint_id), */
-/*              ((cpu_L07_t)constraint_id)->state_current==SURF_CPU_OFF?"Off":"On"); */
-/*     } */
+/*   if(((link_L07_t)constraint_id)->type== */
+/*      SURF_WORKSTATION_RESOURCE_LINK) { */
+/*     XBT_DEBUG("Checking for link %s (%p)", */
+/*      ((link_L07_t)constraint_id)->name, */
+/*      ((link_L07_t)constraint_id)); */
+/*   } */
+/*   if(((cpu_L07_t)constraint_id)->type== */
+/*      SURF_WORKSTATION_RESOURCE_CPU) { */
+/*     XBT_DEBUG("Checking for cpu %s (%p) : %s", */
+/*      ((cpu_L07_t)constraint_id)->name, */
+/*      ((cpu_L07_t)constraint_id), */
+/*      ((cpu_L07_t)constraint_id)->state_current==SURF_CPU_OFF?"Off":"On"); */
+/*   } */
 
         if (((((link_L07_t) constraint_id)->type ==
               SURF_WORKSTATION_RESOURCE_LINK) &&
@@ -344,7 +344,8 @@ static void ptask_update_resource_state(void *id,
   link_L07_t nw_link = id;
 
   if (nw_link->type == SURF_WORKSTATION_RESOURCE_LINK) {
-    XBT_DEBUG("Updating link %s (%p)", surf_resource_name(nw_link), nw_link);
+    XBT_DEBUG("Updating link %s (%p) with value=%f",
+      surf_resource_name(nw_link), nw_link, value);
     if (event_type == nw_link->bw_event) {
       nw_link->bw_current = value;
       lmm_update_constraint_bound(ptask_maxmin_system, nw_link->constraint,
@@ -667,13 +668,13 @@ static void* ptask_cpu_create_resource(const char *name, double power_scale,
 static void ptask_parse_cpu_init(sg_platf_host_cbarg_t host)
 {
   ptask_cpu_create_resource(
-                 host->id,
-                 host->power_peak,
-                 host->power_scale,
-                 host->power_trace,
-                 host->initial_state,
-                 host->state_trace,
-                 host->properties);
+      host->id,
+      host->power_peak,
+      host->power_scale,
+      host->power_trace,
+      host->initial_state,
+      host->state_trace,
+      host->properties);
 }
 
 static void* ptask_link_create_resource(const char *name,
@@ -798,7 +799,7 @@ static void ptask_add_traces(void)
   xbt_dict_foreach(trace_connect_list_link_avail, cursor, trace_name, elm) {
     tmgr_trace_t trace = xbt_dict_get_or_null(traces_set_list, trace_name);
     link_L07_t link =
-               xbt_lib_get_or_null(link_lib, elm, SURF_LINK_LEVEL);
+        xbt_lib_get_or_null(link_lib, elm, SURF_LINK_LEVEL);
 
     xbt_assert(link, "Link %s undefined", elm);
     xbt_assert(trace, "Trace %s undefined", trace_name);
@@ -810,7 +811,7 @@ static void ptask_add_traces(void)
   xbt_dict_foreach(trace_connect_list_bandwidth, cursor, trace_name, elm) {
     tmgr_trace_t trace = xbt_dict_get_or_null(traces_set_list, trace_name);
     link_L07_t link =
-               xbt_lib_get_or_null(link_lib, elm, SURF_LINK_LEVEL);
+        xbt_lib_get_or_null(link_lib, elm, SURF_LINK_LEVEL);
 
     xbt_assert(link, "Link %s undefined", elm);
     xbt_assert(trace, "Trace %s undefined", trace_name);
@@ -821,7 +822,7 @@ static void ptask_add_traces(void)
   xbt_dict_foreach(trace_connect_list_latency, cursor, trace_name, elm) {
     tmgr_trace_t trace = xbt_dict_get_or_null(traces_set_list, trace_name);
     link_L07_t link =
-               xbt_lib_get_or_null(link_lib, elm, SURF_LINK_LEVEL);
+        xbt_lib_get_or_null(link_lib, elm, SURF_LINK_LEVEL);
 
     xbt_assert(link, "Link %s undefined", elm);
     xbt_assert(trace, "Trace %s undefined", trace_name);
@@ -889,10 +890,6 @@ static void ptask_model_init_internal(void)
       ptask_link_shared;
   surf_workstation_model->extension.workstation.get_properties =
       surf_resource_properties;
-  surf_workstation_model->extension.workstation.link_create_resource =
-      ptask_link_create_resource;
-  surf_workstation_model->extension.workstation.cpu_create_resource =
-      ptask_cpu_create_resource;
   surf_workstation_model->extension.workstation.add_traces =
       ptask_add_traces;
 
@@ -913,7 +910,6 @@ static void ptask_model_init_internal(void)
   surf_network_model->extension.network.get_link_latency = ptask_get_link_latency;
   surf_network_model->extension.network.link_shared = ptask_link_shared;
   surf_network_model->extension.network.add_traces = NULL;
-  surf_network_model->extension.network.create_resource = NULL;
 }
 
 /**************************************/