Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of framagit.org:simgrid/simgrid
[simgrid.git] / src / instr / instr_platform.cpp
index c893641..c49bb9c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2020. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2010-2021. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -75,9 +75,7 @@ static void linkContainers(simgrid::instr::Container* src, simgrid::instr::Conta
 
   // find common father
   simgrid::instr::Container* father = lowestCommonAncestor(src, dst);
-  if (not father) {
-    xbt_die("common father unknown, this is a tracing problem");
-  }
+  xbt_assert(father, "common father unknown, this is a tracing problem");
 
   // check if we already register this pair (we only need one direction)
   std::string aux1 = src->get_name() + dst->get_name();
@@ -306,6 +304,9 @@ static void on_link_creation(s4u::Link const& link)
 
 static void on_host_creation(s4u::Host const& host)
 {
+  if (Container::by_name_or_null(host.get_name())) // This host already exists, do nothing
+    return;
+
   Container* container  = new HostContainer(host, currentContainer.back());
   const Container* root = Container::get_root();