Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Rename kernel::activity::Synchro into kernel::activity::ActivityImpl
[simgrid.git] / src / surf / instr_routing.cpp
index cd376b1..ca2809b 100644 (file)
@@ -6,7 +6,7 @@
 
 #include "src/instr/instr_private.h"
 
-#include "src/surf/AsImpl.hpp"
+#include "src/kernel/routing/AsImpl.hpp"
 #include "simgrid/s4u/engine.hpp"
 #include "surf/surf.h"
 #include "src/surf/xml/platf_private.hpp"
@@ -24,7 +24,6 @@ static const char *instr_node_name (xbt_node_t node)
   return str;
 }
 
-
 static container_t lowestCommonAncestor (container_t a1, container_t a2)
 {
   //this is only an optimization (since most of a1 and a2 share the same parent)
@@ -152,7 +151,7 @@ static void recursiveGraphExtraction (simgrid::s4u::As *as, container_t containe
     xbt_dict_cursor_t cursor = nullptr;
     char *edge_name;
 
-    static_cast<simgrid::routing::AsImpl*>(as)->getGraph(graph, nodes, edges);
+    static_cast<simgrid::kernel::routing::AsImpl*>(as)->getGraph(graph, nodes, edges);
     xbt_dict_foreach(edges,cursor,edge_name,edge) {
         linkContainers(
           PJ_container_get((const char*) edge->src->data),
@@ -178,13 +177,11 @@ void sg_instr_AS_begin(sg_platf_AS_cbarg_t AS)
     PJ_container_set_root (root);
 
     if (TRACE_smpi_is_enabled()) {
-      if (!TRACE_smpi_is_grouped()){
-        type_t mpi = PJ_type_get_or_null ("MPI", root->type);
-        if (mpi == nullptr){
-          mpi = PJ_type_container_new("MPI", root->type);
-          PJ_type_state_new ("MPI_STATE", mpi);
-          PJ_type_link_new ("MPI_LINK", PJ_type_get_root(), mpi, mpi);
-        }
+      type_t mpi = PJ_type_get_or_null ("MPI", root->type);
+      if (mpi == nullptr){
+        mpi = PJ_type_container_new("MPI", root->type);
+        if (!TRACE_smpi_is_grouped()) PJ_type_state_new ("MPI_STATE", mpi);
+        PJ_type_link_new ("MPI_LINK", PJ_type_get_root(), mpi, mpi);
       }
     }
 
@@ -284,7 +281,6 @@ void sg_instr_new_host(sg_platf_host_cbarg_t host)
     if (mpi == nullptr){
       mpi = PJ_type_container_new("MPI", container->type);
       PJ_type_state_new ("MPI_STATE", mpi);
-      PJ_type_link_new ("MPI_LINK", PJ_type_get_root(), mpi, mpi);
     }
   }
 
@@ -443,7 +439,6 @@ int instr_platform_traced ()
 
 #define GRAPHICATOR_SUPPORT_FUNCTIONS
 
-
 static void recursiveXBTGraphExtraction (xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges,
     AS_t as, container_t container)
 {
@@ -459,10 +454,10 @@ static void recursiveXBTGraphExtraction (xbt_graph_t graph, xbt_dict_t nodes, xb
     }
   }
 
-  static_cast<simgrid::routing::AsImpl*>(as)->getGraph(graph, nodes, edges);
+  static_cast<simgrid::kernel::routing::AsImpl*>(as)->getGraph(graph, nodes, edges);
 }
 
-xbt_graph_t instr_routing_platform_graph (void)
+xbt_graph_t instr_routing_platform_graph ()
 {
   xbt_graph_t ret = xbt_graph_new_graph (0, nullptr);
   xbt_dict_t nodes = xbt_dict_new_homogeneous(nullptr);