Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[trace] tracing needs a Full network/optim, otherwise it won't work for network
authorLucas Schnorr <Lucas.Schnorr@imag.fr>
Mon, 26 Dec 2011 13:50:11 +0000 (14:50 +0100)
committerLucas Schnorr <Lucas.Schnorr@imag.fr>
Mon, 26 Dec 2011 13:50:11 +0000 (14:50 +0100)
Todo:
- find a way to trace the lazy network update method

src/instr/instr_config.c
src/instr/instr_private.h
src/surf/network.c

index 6c44289..ffff7f8 100644 (file)
@@ -517,6 +517,16 @@ void TRACE_generate_triva_cat_conf (void)
   }
 }
 
   }
 }
 
+void TRACE_set_network_update_mechanism (void)
+{
+  if (TRACE_is_enabled()){
+    if (TRACE_categorized() || TRACE_uncategorized()){
+      XBT_INFO ("Tracing resource utilization active, network/optim configuration now set to Full.");
+      xbt_cfg_set_string (_surf_cfg_set, "network/optim", "Full");
+    }
+  }
+}
+
 #undef OPT_TRACING
 #undef OPT_TRACING_PLATFORM
 #undef OPT_TRACING_SMPI
 #undef OPT_TRACING
 #undef OPT_TRACING_PLATFORM
 #undef OPT_TRACING_SMPI
index 842dc7f..ffdaac2 100644 (file)
@@ -172,6 +172,7 @@ void TRACE_global_init(int *argc, char **argv);
 void TRACE_help(int detailed);
 void TRACE_generate_triva_uncat_conf (void);
 void TRACE_generate_triva_cat_conf (void);
 void TRACE_help(int detailed);
 void TRACE_generate_triva_uncat_conf (void);
 void TRACE_generate_triva_cat_conf (void);
+void TRACE_set_network_update_mechanism (void);
 
 /* from resource_utilization.c */
 void TRACE_surf_host_set_utilization(const char *resource,
 
 /* from resource_utilization.c */
 void TRACE_surf_host_set_utilization(const char *resource,
index 442b4b3..f144df9 100644 (file)
@@ -1046,6 +1046,10 @@ static void surf_network_model_init_internal(void)
 }
 
 static void set_update_mechanism(void) {
 }
 
 static void set_update_mechanism(void) {
+#ifdef HAVE_TRACING
+  TRACE_set_network_update_mechanism ();
+#endif
+
   char *optim = xbt_cfg_get_string(_surf_cfg_set, "network/optim");
   int select = xbt_cfg_get_int(_surf_cfg_set, "network/maxmin_selective_update");
 
   char *optim = xbt_cfg_get_string(_surf_cfg_set, "network/optim");
   int select = xbt_cfg_get_int(_surf_cfg_set, "network/maxmin_selective_update");