* @details This is the ancestor class of every resources in SimGrid, such as links, CPU or disk
*/
class XBT_PUBLIC Resource {
- std::string name_;
- Model* model_;
- bool is_on_ = true;
+ std::string name_ = "unnamed";
+ Model* model_ = nullptr;
+ bool is_on_ = true;
- lmm::Constraint* const constraint_;
+ lmm::Constraint* constraint_ = nullptr;
protected:
struct Metric {
profile::Event* state_event_ = nullptr;
public:
- /**
- * @brief Constructor of LMM Resources
- *
- * @param model Model associated to this Resource
- * @param name The name of the Resource
- * @param constraint The lmm constraint associated to this Resource if it is part of a LMM component
- */
- Resource(Model* model, const std::string& name, lmm::Constraint* constraint)
- : name_(name), model_(model), constraint_(constraint)
- {
- }
-
+ Resource() = default;
virtual ~Resource() = default;
/** @brief Get the Model of the current Resource */
Model* get_model() const { return model_; }
+ Resource* set_model(Model* model);
/** @brief Get the name of the current Resource */
const std::string& get_name() const { return name_; }
/** @brief Get the name of the current Resource */
const char* get_cname() const { return name_.c_str(); }
+ Resource* set_name(const std::string& name);
+
+ /** @brief Get the lmm constraint associated to this Resource if it is part of a LMM component (or null if none) */
+ lmm::Constraint* get_constraint() const { return constraint_; }
+ Resource* set_constraint(lmm::Constraint* constraint);
bool operator==(const Resource& other) const { return name_ == other.name_; }
/** @brief setup the profile file with states events (ON or OFF). The profile must contain boolean values. */
virtual void set_state_profile(profile::Profile* profile);
- /** @brief Get the lmm constraint associated to this Resource if it is part of a LMM component (or null if none) */
- lmm::Constraint* get_constraint() const { return constraint_; }
};
} // namespace resource
} // namespace kernel
int get_host_count() const;
/** @brief Make a host within that NetZone */
- s4u::Host* create_host(const std::string& name, const std::vector<double>& speed_per_pstate, int core_count,
- const std::unordered_map<std::string, std::string>* props);
+ s4u::Host* create_host(const std::string& name, const std::vector<double>& speed_per_pstate, int core_count);
/** @brief Make a link within that NetZone */
virtual s4u::Link* create_link(const std::string& name, const std::vector<double>& bandwidths, double latency,
- s4u::Link::SharingPolicy policy,
- const std::unordered_map<std::string, std::string>* props);
+ s4u::Link::SharingPolicy policy);
/** @brief Creates a new route in this NetZone */
virtual void add_bypass_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
std::vector<resource::LinkImpl*>& link_list, bool symmetrical);
void seal() override;
void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
s4u::Link* create_link(const std::string& name, const std::vector<double>& bandwidths, double latency,
- s4u::Link::SharingPolicy policy,
- const std::unordered_map<std::string, std::string>* props) override;
+ s4u::Link::SharingPolicy policy) override;
NetPoint* get_access_point() {return access_point_;}
private:
public:
#ifndef DOXYGEN
- explicit Disk(const std::string& name, kernel::resource::DiskImpl* pimpl) : pimpl_(pimpl), name_(name) {}
+ explicit Disk(kernel::resource::DiskImpl* pimpl) : pimpl_(pimpl) {}
#endif
/** @brief Callback signal fired when a new Disk is created */
static xbt::signal<void(Disk const&)> on_state_change;
/** @brief Retrieves the name of that disk as a C++ string */
+ Disk* set_name(std::string const& name);
std::string const& get_name() const { return name_; }
/** @brief Retrieves the name of that disk as a C string */
const char* get_cname() const { return name_.c_str(); }
+
+ Disk* set_read_bandwidth(double read_bw);
double get_read_bandwidth() const;
+
+ Disk* set_write_bandwidth(double write_bw);
double get_write_bandwidth() const;
+
const std::unordered_map<std::string, std::string>* get_properties() const;
const char* get_property(const std::string& key) const;
void set_property(const std::string&, const std::string& value);
protected:
virtual ~Host(); // Call destroy() instead of manually deleting it.
- void set_netpoint(kernel::routing::NetPoint* netpoint) { pimpl_netpoint_ = netpoint; }
+ Host* set_netpoint(kernel::routing::NetPoint* netpoint);
#endif
public:
bool is_on() const;
const char* get_property(const std::string& key) const;
- void set_property(const std::string& key, const std::string& value);
+ Host* set_property(const std::string& key, const std::string& value);
const std::unordered_map<std::string, std::string>* get_properties() const;
- void set_properties(const std::unordered_map<std::string, std::string>& properties);
+ Host* set_properties(const std::unordered_map<std::string, std::string>& properties);
void set_state_profile(kernel::profile::Profile* p);
void set_speed_profile(kernel::profile::Profile* p);
int get_pstate() const;
std::vector<Disk*> get_disks() const;
+ Disk* create_disk();
void add_disk(const Disk* disk);
void remove_disk(const std::string& disk_name);
void set_latency_profile(kernel::profile::Profile* profile);
const char* get_property(const std::string& key) const;
- void set_property(const std::string& key, const std::string& value);
+ Link* set_property(const std::string& key, const std::string& value);
+ const std::unordered_map<std::string, std::string>* get_properties() const;
+ Link* set_properties(const std::unordered_map<std::string, std::string>& properties);
/* The signals */
/** @brief Callback signal fired when a new Link is created */
* Resource *
************/
-DiskImpl::DiskImpl(kernel::resource::Model* model, const std::string& name, kernel::lmm::System* maxminSystem,
- double read_bw, double write_bw)
- : Resource(model, name, maxminSystem->constraint_new(this, std::max(read_bw, write_bw)))
- , piface_(name, this)
- , read_bw_(read_bw)
- , write_bw_(write_bw)
+DiskImpl* DiskImpl::set_read_bandwidth(double read_bw)
{
- DiskImpl::turn_on();
- XBT_DEBUG("Create resource with read_bw '%f' write_bw '%f'", read_bw_, write_bw_);
- constraint_read_ = maxminSystem->constraint_new(this, read_bw);
- constraint_write_ = maxminSystem->constraint_new(this, write_bw);
+ read_bw_ = read_bw;
+ return this;
+}
+
+DiskImpl* DiskImpl::set_write_bandwidth(double write_bw)
+{
+ write_bw_ = write_bw;
+ return this;
+}
+
+DiskImpl* DiskImpl::set_read_constraint(lmm::Constraint* constraint_read)
+{
+ constraint_read_ = constraint_read;
+ return this;
+}
+
+DiskImpl* DiskImpl::set_write_constraint(lmm::Constraint* constraint_write)
+{
+ constraint_write_ = constraint_write;
+ return this;
}
/** @brief Fire the required callbacks and destroy the object
DiskModel& operator=(const DiskModel&) = delete;
~DiskModel() override;
- virtual DiskImpl* createDisk(const std::string& id, double read_bw, double write_bw) = 0;
+ virtual DiskImpl* create_disk() = 0;
};
/************
class DiskImpl : public Resource, public xbt::PropertyHolder {
s4u::Host* host_ = nullptr;
s4u::Disk piface_;
- double read_bw_;
- double write_bw_;
- lmm::Constraint* constraint_write_; /* Constraint for maximum write bandwidth*/
- lmm::Constraint* constraint_read_; /* Constraint for maximum read bandwidth*/
+ double read_bw_ = -1.0;
+ double write_bw_ = 1.0;
+ lmm::Constraint* constraint_write_ = nullptr; /* Constraint for maximum write bandwidth*/
+ lmm::Constraint* constraint_read_ = nullptr; /* Constraint for maximum read bandwidth*/
protected:
~DiskImpl() override = default; // Disallow direct deletion. Call destroy() instead.
public:
- DiskImpl(Model* model, const std::string& name, kernel::lmm::System* maxmin_system, double read_bw, double bwrite_bw);
+ DiskImpl() : piface_(this){}
DiskImpl(const DiskImpl&) = delete;
DiskImpl& operator=(const DiskImpl&) = delete;
s4u::Host* get_host() const { return host_; }
void set_host(s4u::Host* host) { host_ = host; }
+ DiskImpl* set_read_bandwidth(double read_bw);
double get_read_bandwidth() const { return read_bw_; }
+
+ DiskImpl* set_write_bandwidth(double write_bw);
double get_write_bandwidth() const { return write_bw_; }
+
+ DiskImpl* set_read_constraint(lmm::Constraint* constraint_read);
lmm::Constraint* get_read_constraint() const { return constraint_read_; }
+
+ DiskImpl* set_write_constraint(lmm::Constraint* constraint_write);
lmm::Constraint* get_write_constraint() const { return constraint_write_; }
/** @brief Check if the Disk is used (if an action currently uses its resources) */
namespace kernel {
namespace resource {
+Resource* Resource::set_name(const std::string& name)
+{
+ name_ = name;
+ return this;
+}
+
+Resource* Resource::set_model(Model* model)
+{
+ model_ = model;
+ return this;
+}
+
+Resource* Resource::set_constraint(lmm::Constraint* constraint)
+{
+ constraint_ = constraint;
+ return this;
+}
+
double Resource::get_load() const
{
return constraint_->get_usage();
public:
static double the_date;
- explicit MockedResource() : simgrid::kernel::resource::Resource(nullptr, "fake", nullptr) {}
+ explicit MockedResource() { this->set_name("fake"); }
void apply_event(simgrid::kernel::profile::Event* event, double value) override
{
XBT_VERB("t=%.1f: Change value to %lg (idx: %u)", the_date, value, event->idx);
}
s4u::Link* NetZoneImpl::create_link(const std::string& name, const std::vector<double>& bandwidths, double latency,
- s4u::Link::SharingPolicy policy,
- const std::unordered_map<std::string, std::string>* props)
+ s4u::Link::SharingPolicy policy)
{
static double last_warned_latency = sg_surf_precision;
if (latency != 0.0 && latency < last_warned_latency) {
auto* l = surf_network_model->create_link(name, bandwidths, latency, policy);
- if (props)
- l->set_properties(*props);
-
return l->get_iface();
}
+
s4u::Host* NetZoneImpl::create_host(const std::string& name, const std::vector<double>& speed_per_pstate,
- int coreAmount, const std::unordered_map<std::string, std::string>* props)
+ int coreAmount)
{
- auto* res = new s4u::Host(name);
-
if (hierarchy_ == RoutingMode::unset)
hierarchy_ = RoutingMode::base;
- res->set_netpoint(new NetPoint(name, NetPoint::Type::Host, this));
+ auto* res = (new s4u::Host(name))->set_netpoint(new NetPoint(name, NetPoint::Type::Host, this));
surf_cpu_model_pm->create_cpu(res, speed_per_pstate, coreAmount);
- if (props != nullptr)
- res->set_properties(*props);
-
- s4u::Host::on_creation(*res); // notify the signal
-
return res;
}
}
}
s4u::Link* WifiZone::create_link(const std::string& name, const std::vector<double>& bandwidths, double latency,
- s4u::Link::SharingPolicy policy,
- const std::unordered_map<std::string, std::string>* props)
+ s4u::Link::SharingPolicy policy)
{
xbt_assert(wifi_link_ == nullptr,
"WIFI netzone %s contains more than one link. Please only declare one, the wifi link.", get_cname());
xbt_assert(policy == s4u::Link::SharingPolicy::WIFI, "Link %s in WIFI zone %s must follow the WIFI sharing policy.",
name.c_str(), get_cname());
- auto s4u_link = NetZoneImpl::create_link(name, bandwidths, latency, policy, props);
+ auto s4u_link = NetZoneImpl::create_link(name, bandwidths, latency, policy);
wifi_link_ = s4u_link->get_impl();
return s4u_link;
}
xbt::signal<void(Disk const&)> Disk::on_destruction;
xbt::signal<void(Disk const&)> Disk::on_state_change;
+Disk* Disk::set_name(const std::string& name)
+{
+ name_ = name;
+ return this;
+}
+
+Disk* Disk::set_read_bandwidth(double read_bw)
+{
+ pimpl_->set_read_bandwidth(read_bw);
+ return this;
+}
+
+Disk* Disk::set_write_bandwidth(double write_bw)
+{
+ pimpl_->set_write_bandwidth(write_bw);
+ return this;
+}
+
double Disk::get_read_bandwidth() const
{
return this->pimpl_->get_read_bandwidth();
new surf::HostImpl(this);
}
+Host* Host::set_netpoint(kernel::routing::NetPoint* netpoint)
+{
+ pimpl_netpoint_ = netpoint;
+ return this;
+}
+
Host::~Host()
{
delete pimpl_;
return this->pimpl_->get_property(key);
}
-void Host::set_property(const std::string& key, const std::string& value)
+Host* Host::set_property(const std::string& key, const std::string& value)
{
kernel::actor::simcall([this, &key, &value] { this->pimpl_->set_property(key, value); });
+ return this;
}
-void Host::set_properties(const std::unordered_map<std::string, std::string>& properties)
+Host* Host::set_properties(const std::unordered_map<std::string, std::string>& properties)
{
kernel::actor::simcall([this, &properties] { this->pimpl_->set_properties(properties); });
+ return this;
}
/** Specify a profile turning the host on and off according to an exhaustive list or a stochastic law.
return kernel::actor::simcall([this] { return this->pimpl_->get_disks(); });
}
+Disk* Host::create_disk()
+{
+ auto pimpl = surf_disk_model->create_disk();
+ return pimpl->get_iface();
+}
+
void Host::add_disk(const Disk* disk)
{
kernel::actor::simcall([this, disk] { this->pimpl_->add_disk(disk); });
{
return this->pimpl_->get_property(key);
}
-void Link::set_property(const std::string& key, const std::string& value)
+Link* Link::set_property(const std::string& key, const std::string& value)
{
simgrid::kernel::actor::simcall([this, &key, &value] { this->pimpl_->set_property(key, value); });
+ return this;
}
+
+const std::unordered_map<std::string, std::string>* Link::get_properties() const
+{
+ return this->pimpl_->get_properties();
+}
+
+Link* Link::set_properties(const std::unordered_map<std::string, std::string>& properties)
+{
+ kernel::actor::simcall([this, &properties] { this->pimpl_->set_properties(properties); });
+ return this;
+}
+
} // namespace s4u
} // namespace simgrid
atexit(SIMIX_clean);
}
-int smx_cleaned = 0;
/**
* @ingroup SIMIX_API
* @brief Clean the SIMIX simulation
*/
void SIMIX_clean()
{
+ static bool smx_cleaned = false;
if (smx_cleaned)
return; // to avoid double cleaning by java and C
- smx_cleaned = 1;
+ smx_cleaned = true;
XBT_DEBUG("SIMIX_clean called. Simulation's over.");
if (not simix_global->actors_to_run.empty() && SIMIX_get_clock() <= 0.0) {
XBT_CRITICAL(" ");
if (smpi_cfg_privatization() == SmpiPrivStrategies::MMAP)
smpi_destroy_global_memory_segments();
- if (simgrid::smpi::F2C::lookup() != nullptr){
- if (simgrid::smpi::F2C::lookup()->size() > simgrid::smpi::F2C::get_num_default_handles()){
- XBT_WARN("Probable Leaks in your code: SMPI detected %zu unfreed MPI handles : "
- "display types and addresses (n max) with --cfg=smpi/list-leaks:n.\n"
- "Running smpirun with -wrapper \"valgrind --leak-check=full\" can provide more information",
- simgrid::smpi::F2C::lookup()->size() - simgrid::smpi::F2C::get_num_default_handles());
- int n = simgrid::config::get_value<int>("smpi/list-leaks");
- for (auto const& p : *simgrid::smpi::F2C::lookup()) {
- static int printed = 0;
- if (printed >= n)
- break;
- if (p.first >= simgrid::smpi::F2C::get_num_default_handles()) {
- XBT_WARN("Leak %p of type %s", p.second, boost::core::demangle(typeid(*(p.second)).name()).c_str());
- printed++;
- }
+ if (simgrid::smpi::F2C::lookup() != nullptr &&
+ simgrid::smpi::F2C::lookup()->size() > simgrid::smpi::F2C::get_num_default_handles()) {
+ XBT_WARN("Probable Leaks in your code: SMPI detected %zu unfreed MPI handles : "
+ "display types and addresses (n max) with --cfg=smpi/list-leaks:n.\n"
+ "Running smpirun with -wrapper \"valgrind --leak-check=full\" can provide more information",
+ simgrid::smpi::F2C::lookup()->size() - simgrid::smpi::F2C::get_num_default_handles());
+ int n = simgrid::config::get_value<int>("smpi/list-leaks");
+ for (auto const& p : *simgrid::smpi::F2C::lookup()) {
+ static int printed = 0;
+ if (printed >= n)
+ break;
+ if (p.first >= simgrid::smpi::F2C::get_num_default_handles()) {
+ XBT_WARN("Leak %p of type %s", p.second, boost::core::demangle(typeid(*(p.second)).name()).c_str());
+ printed++;
}
}
}
} else {
*newgroup = new Group(newsize);
- for (int j = 0, rank = 0; rank < size_; rank++) {
+ int j = 0;
+ for (int rank = 0; rank < size_; rank++) {
if (not to_excl[rank]) {
s4u::Actor* actor = this->actor(rank);
(*newgroup)->set_mapping(actor, j);
Cpu::Cpu(Model* model, s4u::Host* host, lmm::Constraint* constraint, const std::vector<double>& speed_per_pstate,
int core)
- : Resource(model, host->get_cname(), constraint)
- , core_count_(core)
+ : core_count_(core)
, host_(host)
, speed_per_pstate_(speed_per_pstate)
{
+ this->set_name(host->get_cname())->set_model(model)->set_constraint(constraint);
+
xbt_assert(core > 0, "Host %s must have at least one core, not 0.", host->get_cname());
speed_.peak = speed_per_pstate_.front();
all_existing_models.push_back(this);
}
-DiskImpl* DiskS19Model::createDisk(const std::string& id, double read_bw, double write_bw)
+DiskImpl* DiskS19Model::create_disk()
{
- XBT_DEBUG("SURF disk create resource\n\t\tid '%s'\n\t\tread_bw '%f'\n", id.c_str(), read_bw);
-
- return new DiskS19(this, id, get_maxmin_system(), read_bw, write_bw);
+ return new DiskS19();
}
double DiskS19Model::next_occurring_event(double now)
* Resource *
************/
-DiskS19::DiskS19(DiskModel* model, const std::string& name, lmm::System* maxminSystem, double read_bw, double write_bw)
- : DiskImpl(model, name, maxminSystem, read_bw, write_bw)
-{
- XBT_DEBUG("Create resource with read_bw '%f' write_bw '%f'", read_bw, write_bw);
-}
-
DiskAction* DiskS19::io_start(sg_size_t size, s4u::Io::OpType type)
{
return new DiskS19Action(get_model(), static_cast<double>(size), not is_on(), this, type);
class DiskS19Model : public DiskModel {
public:
DiskS19Model();
- DiskImpl* createDisk(const std::string& id, double read_bw, double write_bw) override;
+ DiskImpl* create_disk() override;
double next_occurring_event(double now) override;
void update_actions_state(double now, double delta) override;
};
class DiskS19 : public DiskImpl {
public:
- DiskS19(DiskModel* model, const std::string& name, kernel::lmm::System* maxminSystem, double read_bw,
- double write_bw);
+ DiskS19() = default;
DiskAction* io_start(sg_size_t size, s4u::Io::OpType type) override;
DiskAction* read(sg_size_t size) override;
DiskAction* write(sg_size_t size) override;
************/
LinkImpl::LinkImpl(NetworkModel* model, const std::string& name, lmm::Constraint* constraint)
- : Resource(model, name, constraint), piface_(this)
+ : piface_(this)
{
+ this->set_name(name)->set_model(model)->set_constraint(constraint);
if (name != "__loopback__")
xbt_assert(not s4u::Link::by_name_or_null(name), "Link '%s' declared several times in the platform.", name.c_str());
/** @brief Add a host to the current AS */
void sg_platf_new_host(const simgrid::kernel::routing::HostCreationArgs* args)
{
- std::unordered_map<std::string, std::string> props;
+ simgrid::s4u::Host* host = routing_get_current()->create_host(args->id, args->speed_per_pstate, args->core_amount);
+
if (args->properties) {
- for (auto const& elm : *args->properties)
- props.insert({elm.first, elm.second});
+ host->set_properties(*args->properties);
delete args->properties;
}
- simgrid::s4u::Host* host =
- routing_get_current()->create_host(args->id, args->speed_per_pstate, args->core_amount, &props);
-
host->pimpl_->set_disks(args->disks, host);
/* Change from the defaults */
host->set_pstate(args->pstate);
if (not args->coord.empty())
new simgrid::kernel::routing::vivaldi::Coords(host->get_netpoint(), args->coord);
+
+ simgrid::s4u::Host::on_creation(*host); // notify the signal
}
/** @brief Add a "router" to the network element list */
static void sg_platf_new_link(const simgrid::kernel::routing::LinkCreationArgs* args, const std::string& link_name)
{
- std::unordered_map<std::string, std::string> props;
- if (args->properties)
- for (auto const& elm : *args->properties)
- props.insert({elm.first, elm.second});
+ simgrid::s4u::Link* link = routing_get_current()->create_link(link_name, args->bandwidths, args->latency, args->policy);
- const simgrid::s4u::Link* link =
- routing_get_current()->create_link(link_name, args->bandwidths, args->latency, args->policy, &props);
+ if (args->properties)
+ link->set_properties(*args->properties);
simgrid::kernel::resource::LinkImpl* l = link->get_impl();
if (args->latency_trace)
simgrid::kernel::resource::DiskImpl* sg_platf_new_disk(const simgrid::kernel::routing::DiskCreationArgs* disk)
{
- simgrid::kernel::resource::DiskImpl* d = surf_disk_model->createDisk(disk->id, disk->read_bw, disk->write_bw);
+ simgrid::kernel::lmm::System* maxmin_system = surf_disk_model->get_maxmin_system();
+ simgrid::kernel::resource::DiskImpl* pimpl = surf_disk_model->create_disk();
+
+ // This should be done using s4u::Disk methods and passed to the pimpl
+ pimpl->set_read_bandwidth(disk->read_bw)
+ ->set_write_bandwidth(disk->write_bw)
+ ->set_name(disk->id);
if (disk->properties) {
- d->set_properties(*disk->properties);
+ pimpl->set_properties(*disk->properties);
delete disk->properties;
}
- simgrid::s4u::Disk::on_creation(*d->get_iface());
- return d;
+
+ // This should be done in the seal() of a Disk creation
+ pimpl->set_read_constraint(maxmin_system->constraint_new(pimpl,disk->read_bw))
+ ->set_write_constraint(maxmin_system->constraint_new(pimpl, disk->write_bw))
+ ->set_model(surf_disk_model)
+ ->set_constraint(maxmin_system->constraint_new(pimpl, std::max(disk->read_bw, disk->write_bw)));
+
+ XBT_DEBUG("Create resource with read_bw '%f' write_bw '%f'", disk->read_bw, disk->write_bw);
+ pimpl->turn_on();
+
+ // Temporary hack
+ pimpl->get_iface()->set_name(disk->id);
+ simgrid::s4u::Disk::on_creation(*pimpl->get_iface());
+ return pimpl;
}
void sg_platf_new_route(simgrid::kernel::routing::RouteCreationArgs* route)
std::vector<double> speed_per_pstate;
speed_per_pstate.push_back(peer->speed);
- simgrid::s4u::Host* host = as->create_host(peer->id, speed_per_pstate, 1, nullptr);
+ simgrid::s4u::Host* host = as->create_host(peer->id, speed_per_pstate, 1);
as->set_peer_link(host->get_netpoint(), peer->bw_in, peer->bw_out, peer->coord);
host->set_state_profile(peer->state_trace);
if (peer->speed_trace)
host->set_speed_profile(peer->speed_trace);
+ simgrid::s4u::Host::on_creation(*host); // notify the signal
}
/* Pick the right models for CPU, net and host, and call their model_init_preparse */
}
/**
- * @brief Specify that the description of the current AS is finished
+ * @brief Specify that the description of the current Zone is finished
*
- * Once you've declared all the content of your AS, you have to seal
- * it with this call. Your AS is not usable until you call this function.
+ * Once you've declared all the content of your Zone, you have to seal
+ * it with this call. Your Zone is not usable until you call this function.
*/
void sg_platf_new_Zone_seal()
{
- xbt_assert(current_routing, "Cannot seal the current AS: none under construction");
+ xbt_assert(current_routing, "Cannot seal the current Zone: zone under construction");
current_routing->seal();
simgrid::s4u::NetZone::on_seal(*current_routing->get_iface());
current_routing = current_routing->get_father();
}
-/** @brief Add a link connecting a host to the rest of its AS (which must be cluster or vivaldi) */
+/** @brief Add a link connecting a host to the rest of its Zone (which must be cluster or vivaldi) */
void sg_platf_new_hostlink(const simgrid::kernel::routing::HostLinkCreationArgs* hostlink)
{
const simgrid::kernel::routing::NetPoint* netpoint = simgrid::s4u::Host::by_name(hostlink->id)->get_netpoint();
xbt_assert(netpoint, "Host '%s' not found!", hostlink->id.c_str());
xbt_assert(dynamic_cast<simgrid::kernel::routing::ClusterZone*>(current_routing),
- "Only hosts from Cluster and Vivaldi ASes can get a host_link.");
+ "Only hosts from Cluster and Vivaldi Zones can get a host_link.");
const simgrid::s4u::Link* linkUp = simgrid::s4u::Link::by_name_or_null(hostlink->link_up);
const simgrid::s4u::Link* linkDown = simgrid::s4u::Link::by_name_or_null(hostlink->link_down);
void *mmalloc_preinit(void);
void mmalloc_postexit(void);
-extern int smx_cleaned;
extern int xbt_initialized;
SG_END_DECL