Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Link-load plugin: check no link exists
[simgrid.git] / src / plugins / link_load.cpp
index 0ecac0cac99f86a160b621a0abc8a1d8bfe6d890..27c0cf21a2c800a11565ad7c1b9f5c28262c901f 100644 (file)
@@ -181,7 +181,8 @@ static void on_communication(const simgrid::kernel::activity::CommImpl& comm)
  */
 void sg_link_load_plugin_init()
 {
-  xbt_assert(simgrid::s4u::Engine::get_instance()->get_host_count() == 0,
+  xbt_assert(simgrid::s4u::Engine::get_instance()->get_host_count() == 0 &&
+                 simgrid::s4u::Engine::get_instance()->get_link_count() == 0,
              "Please call sg_link_load_plugin_init() BEFORE initializing the platform.");
   xbt_assert(not LinkLoad::EXTENSION_ID.valid(), "Double call to sg_link_load_plugin_init. Aborting.");
   LinkLoad::EXTENSION_ID = simgrid::s4u::Link::extension_create<LinkLoad>();