#include "virtual_machine.hpp"
#include "src/instr/instr_private.h" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals
#include "simgrid/s4u/engine.hpp"
+#include <vector>
XBT_LOG_NEW_CATEGORY(surf, "All SURF categories");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_kernel, surf, "Logging specific to SURF (kernel)");
simgrid::trace_mgr::future_evt_set *future_evt_set = nullptr;
xbt_dynar_t surf_path = nullptr;
-xbt_dynar_t host_that_restart = xbt_dynar_new(sizeof(char*), nullptr);
+std::vector<simgrid::s4u::Host*> host_that_restart;
xbt_dict_t watched_hosts_lib;
namespace simgrid {
surf_network_model_init_IB},
{"CM02", "Legacy network analytic model (Very similar to LV08, but without corrective factors. The timings of small messages are thus poorly modeled).",
surf_network_model_init_CM02},
-#if HAVE_NS3
{"NS3", "Network pseudo-model using the NS3 tcp model instead of an analytic model", surf_network_model_init_NS3},
-#endif
{"Reno", "Model from Steven H. Low using lagrange_solve instead of lmm_solve (experts only; check the code for more info).",
surf_network_model_init_Reno},
{"Reno2", "Model from Steven H. Low using lagrange_solve instead of lmm_solve (experts only; check the code for more info).",
{nullptr, nullptr, nullptr} /* this array must be nullptr terminated */
};
+#if ! HAVE_SMPI
+void surf_network_model_init_SMPI() {
+ xbt_die("Please activate SMPI support in cmake to use the SMPI network model.");
+}
+void surf_network_model_init_IB() {
+ xbt_die("Please activate SMPI support in cmake to use the IB network model.");
+}
+#endif
+#if !HAVE_NS3
+void surf_network_model_init_NS3() {
+ xbt_die("Please activate NS3 support in cmake and install the dependencies to use the NS3 network model.");
+}
+#endif
+
s_surf_model_description_t surf_cpu_model_description[] = {
{"Cas01", "Simplistic CPU model (time=size/power).", surf_cpu_model_init_Cas01},
{nullptr, nullptr, nullptr} /* this array must be nullptr terminated */
});
XBT_DEBUG("Add SURF levels");
- simgrid::surf::HostImpl::classInit();
SURF_STORAGE_LEVEL = xbt_lib_add_level(storage_lib,surf_storage_free);
xbt_init(argc, argv);
{
TRACE_end(); /* Just in case it was not called by the upper layer (or there is no upper layer) */
- sg_config_finalize();
-
- xbt_dynar_free(&host_that_restart);
xbt_dynar_free(&surf_path);
xbt_dict_free(&host_list);