Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
explicitely capture variables in lambda to please sonar
[simgrid.git] / src / surf / surf_interface.cpp
index d5b6319..3f44e4f 100644 (file)
 #include "simgrid/sg_config.h"
 #include "src/instr/instr_private.h" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals
 #include "src/internal_config.h"
+#include "src/kernel/routing/NetCard.hpp"
 #include "src/simix/smx_host_private.h"
 #include "src/surf/HostImpl.hpp"
 #include "surf_private.h"
-#include "surf_routing.hpp"
 #include <vector>
 
 XBT_LOG_NEW_CATEGORY(surf, "All SURF categories");
@@ -99,11 +99,6 @@ s_surf_model_description_t surf_host_model_description[] = {
   {nullptr, nullptr, nullptr}      /* this array must be nullptr terminated */
 };
 
-s_surf_model_description_t surf_vm_model_description[] = {
-  {"default", "Default vm model.", &surf_vm_model_init_HL13},
-  {nullptr, nullptr, nullptr}      /* this array must be nullptr terminated */
-};
-
 s_surf_model_description_t surf_optimization_mode_description[] = {
   {"Lazy", "Lazy action management (partial invalidation in lmm + heap in action remaining).", nullptr},
   {"TI",   "Trace integration. Highly optimized mode when using availability traces (only available for the Cas01 CPU model for now).", nullptr},
@@ -294,18 +289,11 @@ void surf_init(int *argc, char **argv)
   XBT_DEBUG("Create all Libs");
   USER_HOST_LEVEL = simgrid::s4u::Host::extension_create(nullptr);
 
-  as_router_lib = xbt_lib_new();
   storage_lib = xbt_lib_new();
   storage_type_lib = xbt_lib_new();
   file_lib = xbt_lib_new();
   watched_hosts_lib = xbt_dict_new_homogeneous(nullptr);
 
-  XBT_DEBUG("Add routing levels");
-  ROUTING_PROP_ASR_LEVEL = xbt_lib_add_level(as_router_lib, nullptr);
-  ROUTING_ASR_LEVEL = xbt_lib_add_level(as_router_lib, [](void* p) {
-    delete static_cast<simgrid::kernel::routing::NetCard*>(p);
-  });
-
   XBT_DEBUG("Add SURF levels");
   SURF_STORAGE_LEVEL = xbt_lib_add_level(storage_lib,surf_storage_free);
 
@@ -333,7 +321,6 @@ void surf_exit()
   xbt_dynar_free(&surf_path);
 
   sg_host_exit();
-  xbt_lib_free(&as_router_lib);
   xbt_lib_free(&storage_lib);
   sg_link_exit();
   xbt_lib_free(&storage_type_lib);