Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
partially plug leak. Do not see why one remains :-/
authorSUTER Frederic <frederic.suter@cc.in2p3.fr>
Sun, 26 Dec 2021 11:35:51 +0000 (12:35 +0100)
committerSUTER Frederic <frederic.suter@cc.in2p3.fr>
Sun, 26 Dec 2021 11:35:56 +0000 (12:35 +0100)
src/s4u/s4u_Activity.cpp
src/simdag/sd_dotloader.cpp

index 8c22f58..ace662e 100644 (file)
@@ -76,8 +76,10 @@ Activity* Activity::cancel()
 {
   kernel::actor::simcall([this] {
     XBT_HERE();
-    pimpl_->cancel();
+    if (pimpl_)
+      pimpl_->cancel();
   });
+  release_dependencies();
   complete(State::CANCELED);
   return this;
 }
index 4a54f7c..c7494d0 100644 (file)
@@ -122,6 +122,8 @@ std::vector<ActivityPtr> create_DAG_from_dot(const std::string& filename)
   if (not check_for_cycle(dag)) {
     std::string base = simgrid::xbt::Path(filename).get_base_name();
     XBT_ERROR("The DOT described in %s is not a DAG. It contains a cycle.", base.c_str());
+    for (const auto& a : dag)
+      a->cancel();
     dag.clear();
   }