Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[trace] new tracing option to disable the topology tracing as a graph
authorLucas Schnorr <Lucas.Schnorr@imag.fr>
Mon, 12 Nov 2012 14:09:41 +0000 (15:09 +0100)
committerLucas Schnorr <Lucas.Schnorr@imag.fr>
Mon, 12 Nov 2012 14:09:41 +0000 (15:09 +0100)
do:
--cfg=tracing/platform/topology:0 to disable it

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

index 1b1f1a3..a02347e 100644 (file)
@@ -14,6 +14,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_config, instr, "Configuration");
 
 #define OPT_TRACING               "tracing"
 #define OPT_TRACING_PLATFORM      "tracing/platform"
 
 #define OPT_TRACING               "tracing"
 #define OPT_TRACING_PLATFORM      "tracing/platform"
+#define OPT_TRACING_TOPOLOGY      "tracing/platform/topology"
 #define OPT_TRACING_SMPI          "tracing/smpi"
 #define OPT_TRACING_SMPI_GROUP    "tracing/smpi/group"
 #define OPT_TRACING_SMPI_COMPUTING "tracing/smpi/computing"
 #define OPT_TRACING_SMPI          "tracing/smpi"
 #define OPT_TRACING_SMPI_GROUP    "tracing/smpi/group"
 #define OPT_TRACING_SMPI_COMPUTING "tracing/smpi/computing"
@@ -34,6 +35,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_config, instr, "Configuration");
 
 static int trace_enabled;
 static int trace_platform;
 
 static int trace_enabled;
 static int trace_platform;
+static int trace_platform_topology;
 static int trace_smpi_enabled;
 static int trace_smpi_grouped;
 static int trace_smpi_computing;
 static int trace_smpi_enabled;
 static int trace_smpi_grouped;
 static int trace_smpi_computing;
@@ -52,6 +54,7 @@ static void TRACE_getopts(void)
 {
   trace_enabled = xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING);
   trace_platform = xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_PLATFORM);
 {
   trace_enabled = xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING);
   trace_platform = xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_PLATFORM);
+  trace_platform_topology = xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_TOPOLOGY);
   trace_smpi_enabled = xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_SMPI);
   trace_smpi_grouped = xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_SMPI_GROUP);
   trace_smpi_computing = xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_SMPI_COMPUTING);
   trace_smpi_enabled = xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_SMPI);
   trace_smpi_grouped = xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_SMPI_GROUP);
   trace_smpi_computing = xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_SMPI_COMPUTING);
@@ -152,6 +155,11 @@ int TRACE_platform(void)
   return trace_platform;
 }
 
   return trace_platform;
 }
 
+int TRACE_platform_topology(void)
+{
+  return trace_platform_topology;
+}
+
 int TRACE_is_configured(void)
 {
   return trace_configured;
 int TRACE_is_configured(void)
 {
   return trace_configured;
@@ -267,6 +275,13 @@ void TRACE_global_init(int *argc, char **argv)
                    xbt_cfgelm_int, &default_tracing_platform, 0, 1,
                    NULL, NULL);
 
                    xbt_cfgelm_int, &default_tracing_platform, 0, 1,
                    NULL, NULL);
 
+  /* register platform in the trace */
+  int default_tracing_platform_topology = 1;
+  xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_TOPOLOGY,
+                   "Register the platform topology in the trace as a graph.",
+                   xbt_cfgelm_int, &default_tracing_platform_topology, 0, 1,
+                   NULL, NULL);
+
   /* smpi */
   int default_tracing_smpi = 0;
   xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_SMPI,
   /* smpi */
   int default_tracing_smpi = 0;
   xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_SMPI,
@@ -497,6 +512,12 @@ void TRACE_help (int detailed)
       "  file for the Viva visualization tool that can be used to analyze a categorized\n"
       "  resource utilization.",
       detailed);
       "  file for the Viva visualization tool that can be used to analyze a categorized\n"
       "  resource utilization.",
       detailed);
+  print_line (OPT_TRACING_TOPOLOGY, "Register the platform topology as a graph",
+        "  This option (enabled by default) can be used to disable the tracing of\n"
+        "  the platform topology in the trace file. Sometimes, such task is really\n"
+        "  time consuming, since it must get the route from each host ot other hosts\n"
+        "  within the same Autonomous System (AS).",
+        detailed);
 }
 
 static void output_types (const char *name, xbt_dynar_t types, FILE *file)
 }
 
 static void output_types (const char *name, xbt_dynar_t types, FILE *file)
@@ -667,6 +688,7 @@ void instr_resume_tracing (void)
 
 #undef OPT_TRACING
 #undef OPT_TRACING_PLATFORM
 
 #undef OPT_TRACING
 #undef OPT_TRACING_PLATFORM
+#undef OPT_TRACING_TOPOLOGY
 #undef OPT_TRACING_SMPI
 #undef OPT_TRACING_SMPI_GROUP
 #undef OPT_TRACING_CATEGORIZED
 #undef OPT_TRACING_SMPI
 #undef OPT_TRACING_SMPI_GROUP
 #undef OPT_TRACING_CATEGORIZED
index b4b661f..ea7a2c0 100644 (file)
@@ -185,6 +185,7 @@ int TRACE_end (void);
 int TRACE_needs_platform (void);
 int TRACE_is_enabled(void);
 int TRACE_platform(void);
 int TRACE_needs_platform (void);
 int TRACE_is_enabled(void);
 int TRACE_platform(void);
+int TRACE_platform_topology(void);
 int TRACE_is_configured(void);
 int TRACE_smpi_is_enabled(void);
 int TRACE_smpi_is_grouped(void);
 int TRACE_is_configured(void);
 int TRACE_smpi_is_enabled(void);
 int TRACE_smpi_is_grouped(void);