#include "simgrid/s4u/Exec.hpp"
#include "simgrid/s4u/VirtualMachine.hpp"
#include "src/plugins/vm/VirtualMachineImpl.hpp"
#include "simgrid/s4u/Exec.hpp"
#include "simgrid/s4u/VirtualMachine.hpp"
#include "src/plugins/vm/VirtualMachineImpl.hpp"
- if (pimpl_netpoint != nullptr) // not removed yet by a children class
- Engine::get_instance()->netpoint_unregister(pimpl_netpoint);
+ if (pimpl_netpoint_ != nullptr) // not removed yet by a children class
+ Engine::get_instance()->netpoint_unregister(pimpl_netpoint_);
for (VirtualMachine* const& vm : vm::VirtualMachineImpl::allVms_)
if (vm->get_pm() == this) {
vm->shutdown();
vm->turn_off();
}
this->pimpl_cpu->turn_off();
for (VirtualMachine* const& vm : vm::VirtualMachineImpl::allVms_)
if (vm->get_pm() == this) {
vm->shutdown();
vm->turn_off();
}
this->pimpl_cpu->turn_off();
std::vector<kernel::resource::LinkImpl*> linkImpls;
this->route_to(dest, linkImpls, latency);
for (kernel::resource::LinkImpl* const& l : linkImpls)
std::vector<kernel::resource::LinkImpl*> linkImpls;
this->route_to(dest, linkImpls, latency);
for (kernel::resource::LinkImpl* const& l : linkImpls)
}
/** @brief Just like Host::routeTo, but filling an array of link implementations */
void Host::route_to(Host* dest, std::vector<kernel::resource::LinkImpl*>& links, double* latency)
{
}
/** @brief Just like Host::routeTo, but filling an array of link implementations */
void Host::route_to(Host* dest, std::vector<kernel::resource::LinkImpl*>& links, double* latency)
{
- kernel::routing::NetZoneImpl::get_global_route(pimpl_netpoint, dest->pimpl_netpoint, links, latency);
+ kernel::routing::NetZoneImpl::get_global_route(pimpl_netpoint_, dest->get_netpoint(), links, latency);
if (XBT_LOG_ISENABLED(surf_route, xbt_log_priority_debug)) {
XBT_CDEBUG(surf_route, "Route from '%s' to '%s' (latency: %f):", get_cname(), dest->get_cname(),
(latency == nullptr ? -1 : *latency));
if (XBT_LOG_ISENABLED(surf_route, xbt_log_priority_debug)) {
XBT_CDEBUG(surf_route, "Route from '%s' to '%s' (latency: %f):", get_cname(), dest->get_cname(),
(latency == nullptr ? -1 : *latency));
if (mounts_ == nullptr) {
mounts_ = new std::unordered_map<std::string, Storage*>();
for (auto const& m : this->pimpl_->storage_) {
if (mounts_ == nullptr) {
mounts_ = new std::unordered_map<std::string, Storage*>();
for (auto const& m : this->pimpl_->storage_) {
std::vector<simgrid::s4u::Host*> list = simgrid::s4u::Engine::get_instance()->get_all_hosts();
auto last = std::remove_if(begin(list), end(list), [](const simgrid::s4u::Host* host) {
std::vector<simgrid::s4u::Host*> list = simgrid::s4u::Engine::get_instance()->get_all_hosts();
auto last = std::remove_if(begin(list), end(list), [](const simgrid::s4u::Host* host) {
});
std::sort(begin(list), last,
[](const simgrid::s4u::Host* a, const simgrid::s4u::Host* b) { return a->get_name() < b->get_name(); });
});
std::sort(begin(list), last,
[](const simgrid::s4u::Host* a, const simgrid::s4u::Host* b) { return a->get_name() < b->get_name(); });
for (auto const& elm : host->get_mounted_storages()) {
const char* mount_name = elm.first.c_str();
sg_storage_t storage = elm.second;
for (auto const& elm : host->get_mounted_storages()) {
const char* mount_name = elm.first.c_str();
sg_storage_t storage = elm.second;
- xbt_dict_set(res, mount_name, (void*)storage->get_cname(), nullptr);
+ xbt_dict_set(res, mount_name, (void*)storage->get_cname());
- xbt_dict_set(as_dict, elm.first.c_str(), xbt_strdup(elm.second.c_str()), nullptr);
+ xbt_dict_set(as_dict, elm.first.c_str(), xbt_strdup(elm.second.c_str()));
}
/* needs to be public and without simcall for exceptions and logging events */
const char* sg_host_self_get_name()
{
}
/* needs to be public and without simcall for exceptions and logging events */
const char* sg_host_self_get_name()
{
- sg_host_t host = sg_host_self();
- if (host == nullptr || SIMIX_process_self() == simix_global->maestro_process)
- return "";
-
- return host->get_cname();
+ return SIMIX_is_maestro() ? "" : simgrid::kernel::actor::ActorImpl::self()->get_host()->get_cname();