Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
new configuration option tracing/smpi/group
authorschnorr <schnorr@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 5 Nov 2010 09:40:38 +0000 (09:40 +0000)
committerschnorr <schnorr@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 5 Nov 2010 09:40:38 +0000 (09:40 +0000)
details:
- by default, it is set to 0
- if is 0, the behavior of each MPI process (in the interface
level: MPI_Send, Recv, ...) is not group by host (this means
that you do not know where it was executed by looking only the
trace)
- otherwise, processes are grouped by host

info:
- traditional mpi-focused visualization tools usually do not
group by hosts: that is the reason we are keeping the default value
to 0 (not grouped)

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8498 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/instr/instr_config.c
src/instr/interface.c
src/instr/private.h
src/instr/smpi_instr.c

index 684b36c..8d31014 100644 (file)
@@ -10,6 +10,7 @@
 #ifdef HAVE_TRACING
 
 #define OPT_TRACING_SMPI          "tracing/smpi"
 #ifdef HAVE_TRACING
 
 #define OPT_TRACING_SMPI          "tracing/smpi"
+#define OPT_TRACING_SMPI_GROUP    "tracing/smpi/group"
 #define OPT_TRACING_PLATFORM      "tracing/platform"
 #define OPT_TRACING_MSG_TASK      "tracing/msg/task"
 #define OPT_TRACING_MSG_PROCESS   "tracing/msg/process"
 #define OPT_TRACING_PLATFORM      "tracing/platform"
 #define OPT_TRACING_MSG_TASK      "tracing/msg/task"
 #define OPT_TRACING_MSG_PROCESS   "tracing/msg/process"
@@ -29,6 +30,11 @@ int TRACE_smpi_is_enabled(void)
   return xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_SMPI);
 }
 
   return xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_SMPI);
 }
 
+int TRACE_smpi_is_grouped(void)
+{
+  return xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_SMPI_GROUP);
+}
+
 int TRACE_platform_is_enabled(void)
 {
   return xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_PLATFORM);
 int TRACE_platform_is_enabled(void)
 {
   return xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_PLATFORM);
@@ -75,6 +81,14 @@ void TRACE_global_init(int *argc, char **argv)
                    xbt_cfgelm_int, &default_tracing_smpi, 0, 1,
                    NULL, NULL);
 
                    xbt_cfgelm_int, &default_tracing_smpi, 0, 1,
                    NULL, NULL);
 
+  /* smpi grouped */
+  int default_tracing_smpi_grouped = 0;
+  xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_SMPI_GROUP,
+                   "Group MPI processes by host.",
+                   xbt_cfgelm_int, &default_tracing_smpi_grouped, 0, 1,
+                   NULL, NULL);
+
+
   /* platform */
   int default_tracing_platform = 0;
   xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_PLATFORM,
   /* platform */
   int default_tracing_platform = 0;
   xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_PLATFORM,
index 524bde4..bf898aa 100644 (file)
@@ -81,7 +81,11 @@ int TRACE_start()
   }
 
   if (IS_TRACING_SMPI) {
   }
 
   if (IS_TRACING_SMPI) {
-    pajeDefineContainerType("MPI_PROCESS", "HOST", "MPI_PROCESS");
+    if (TRACE_smpi_is_grouped()){
+      pajeDefineContainerType("MPI_PROCESS", "HOST", "MPI_PROCESS");
+    }else{
+      pajeDefineContainerType("MPI_PROCESS", "PLATFORM", "MPI_PROCESS");
+    }
     pajeDefineStateType("MPI_STATE", "MPI_PROCESS", "MPI_STATE");
     pajeDefineLinkType("MPI_LINK", "0", "MPI_PROCESS", "MPI_PROCESS",
                        "MPI_LINK");
     pajeDefineStateType("MPI_STATE", "MPI_PROCESS", "MPI_STATE");
     pajeDefineLinkType("MPI_LINK", "0", "MPI_PROCESS", "MPI_PROCESS",
                        "MPI_LINK");
index a093468..6ceeade 100644 (file)
@@ -168,6 +168,7 @@ void TRACE_smpi_recv(int rank, int src, int dst);
 /* from instr_config.c */
 int TRACE_is_configured(void);
 int TRACE_smpi_is_enabled(void);
 /* from instr_config.c */
 int TRACE_is_configured(void);
 int TRACE_smpi_is_enabled(void);
+int TRACE_smpi_is_grouped(void);
 int TRACE_platform_is_enabled(void);
 int TRACE_msg_task_is_enabled(void);
 int TRACE_msg_process_is_enabled(void);
 int TRACE_platform_is_enabled(void);
 int TRACE_msg_task_is_enabled(void);
 int TRACE_msg_process_is_enabled(void);
index 4eac5a0..e02385f 100644 (file)
@@ -77,8 +77,13 @@ void TRACE_smpi_init(int rank)
 
   char str[INSTR_DEFAULT_STR_SIZE];
   TRACE_smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
 
   char str[INSTR_DEFAULT_STR_SIZE];
   TRACE_smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
-  pajeCreateContainer(SIMIX_get_clock(), str, "MPI_PROCESS",
+  if (TRACE_smpi_is_grouped()){
+    pajeCreateContainer(SIMIX_get_clock(), str, "MPI_PROCESS",
                       SIMIX_host_get_name(SIMIX_host_self()), str);
                       SIMIX_host_get_name(SIMIX_host_self()), str);
+  }else{
+    pajeCreateContainer(SIMIX_get_clock(), str, "MPI_PROCESS",
+                      "platform", str);
+  }
 }
 
 void TRACE_smpi_finalize(int rank)
 }
 
 void TRACE_smpi_finalize(int rank)