From e2b44d0a7186b2117cfa3d9b810a070992cf88d4 Mon Sep 17 00:00:00 2001 From: Frederic Suter Date: Sun, 5 Aug 2018 13:35:11 +0200 Subject: [PATCH] SIMIX_host_autorestart was a duplicate of host->turn_on --- src/simix/smx_global.cpp | 2 +- src/simix/smx_host.cpp | 18 ------------------ src/simix/smx_host_private.hpp | 1 - 3 files changed, 1 insertion(+), 20 deletions(-) diff --git a/src/simix/smx_global.cpp b/src/simix/smx_global.cpp index c527f79be5..eecd1d4c2b 100644 --- a/src/simix/smx_global.cpp +++ b/src/simix/smx_global.cpp @@ -506,7 +506,7 @@ void SIMIX_run() /* Autorestart all process */ for (auto const& host : host_that_restart) { XBT_INFO("Restart processes on host %s", host->get_cname()); - SIMIX_host_autorestart(host); + host->turn_on(); } host_that_restart.clear(); diff --git a/src/simix/smx_host.cpp b/src/simix/smx_host.cpp index fbcdab3eec..3099554fe8 100644 --- a/src/simix/smx_host.cpp +++ b/src/simix/smx_host.cpp @@ -45,24 +45,6 @@ void SIMIX_host_add_auto_restart_process(sg_host_t host, simgrid::kernel::actor: } } -/** @brief Restart the list of processes that have been registered to the host */ -void SIMIX_host_autorestart(sg_host_t host) -{ - std::map process_list = host->pimpl_->actors_at_boot_; - - for (auto const& elm : process_list) { - simgrid::kernel::actor::ProcessArg* arg = elm.second; - XBT_DEBUG("Restarting Process %s@%s right now", arg->name.c_str(), arg->host->get_cname()); - smx_actor_t actor = simix_global->create_process_function(arg->name.c_str(), arg->code, nullptr, arg->host, - arg->properties.get(), nullptr); - if (arg->kill_time >= 0) - simcall_process_set_kill_time(actor, arg->kill_time); - if (arg->auto_restart) - actor->auto_restart_ = arg->auto_restart; - } - process_list.clear(); -} - simgrid::kernel::activity::ExecImplPtr SIMIX_execution_start(std::string name, std::string category, double flops_amount, double priority, double bound, sg_host_t host) diff --git a/src/simix/smx_host_private.hpp b/src/simix/smx_host_private.hpp index fe4c5dcdc3..b02afbd51c 100644 --- a/src/simix/smx_host_private.hpp +++ b/src/simix/smx_host_private.hpp @@ -11,7 +11,6 @@ #include XBT_PRIVATE void SIMIX_host_add_auto_restart_process(sg_host_t host, simgrid::kernel::actor::ActorImpl* actor); -XBT_PRIVATE void SIMIX_host_autorestart(sg_host_t host); XBT_PRIVATE void SIMIX_execution_finish(smx_activity_t synchro); -- 2.20.1