From: Martin Quinson Date: Wed, 23 May 2018 16:04:28 +0000 (+0200) Subject: snake_case some easy parts of s4u::Host X-Git-Tag: v3.20~199 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/e83a6a62aac54e3477bd15c64f243cfa23b3add3 snake_case some easy parts of s4u::Host This will make the interesting parts of the commit more readable. --- diff --git a/examples/s4u/energy-boot/s4u-energy-boot.cpp b/examples/s4u/energy-boot/s4u-energy-boot.cpp index d631c0006f..9db943512b 100644 --- a/examples/s4u/energy-boot/s4u-energy-boot.cpp +++ b/examples/s4u/energy-boot/s4u-energy-boot.cpp @@ -37,10 +37,10 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "Messages specific for this example"); static void simulate_bootup(simgrid::s4u::Host* host) { - int previous_pstate = host->getPstate(); + int previous_pstate = host->get_pstate(); XBT_INFO("Switch to virtual pstate 3, that encodes the 'booting up' state in that platform"); - host->setPstate(3); + host->set_pstate(3); XBT_INFO("Actually start the host"); host->turn_on(); @@ -49,21 +49,21 @@ static void simulate_bootup(simgrid::s4u::Host* host) simgrid::s4u::this_actor::sleep_for(150); XBT_INFO("The host is now up and running. Switch back to previous pstate %d", previous_pstate); - host->setPstate(previous_pstate); + host->set_pstate(previous_pstate); } static void simulate_shutdown(simgrid::s4u::Host* host) { - int previous_pstate = host->getPstate(); + int previous_pstate = host->get_pstate(); XBT_INFO("Switch to virtual pstate 4, that encodes the 'shutting down' state in that platform"); - host->setPstate(4); + host->set_pstate(4); XBT_INFO("Wait 7 seconds to simulate the shutdown time."); simgrid::s4u::this_actor::sleep_for(7); XBT_INFO("Switch back to previous pstate %d, that will be used on reboot.", previous_pstate); - host->setPstate(previous_pstate); + host->set_pstate(previous_pstate); XBT_INFO("Actually shutdown the host"); host->turn_off(); @@ -73,25 +73,25 @@ static int monitor() { simgrid::s4u::Host* host1 = simgrid::s4u::Host::by_name("MyHost1"); - XBT_INFO("Initial pstate: %d; Energy dissipated so far:%.0E J", host1->getPstate(), + XBT_INFO("Initial pstate: %d; Energy dissipated so far:%.0E J", host1->get_pstate(), sg_host_get_consumed_energy(host1)); XBT_INFO("Sleep for 10 seconds"); simgrid::s4u::this_actor::sleep_for(10); - XBT_INFO("Done sleeping. Current pstate: %d; Energy dissipated so far: %.2f J", host1->getPstate(), + XBT_INFO("Done sleeping. Current pstate: %d; Energy dissipated so far: %.2f J", host1->get_pstate(), sg_host_get_consumed_energy(host1)); simulate_shutdown(host1); - XBT_INFO("Host1 is now OFF. Current pstate: %d; Energy dissipated so far: %.2f J", host1->getPstate(), + XBT_INFO("Host1 is now OFF. Current pstate: %d; Energy dissipated so far: %.2f J", host1->get_pstate(), sg_host_get_consumed_energy(host1)); XBT_INFO("Sleep for 10 seconds"); simgrid::s4u::this_actor::sleep_for(10); - XBT_INFO("Done sleeping. Current pstate: %d; Energy dissipated so far: %.2f J", host1->getPstate(), + XBT_INFO("Done sleeping. Current pstate: %d; Energy dissipated so far: %.2f J", host1->get_pstate(), sg_host_get_consumed_energy(host1)); simulate_bootup(host1); - XBT_INFO("Host1 is now ON again. Current pstate: %d; Energy dissipated so far: %.2f J", host1->getPstate(), + XBT_INFO("Host1 is now ON again. Current pstate: %d; Energy dissipated so far: %.2f J", host1->get_pstate(), sg_host_get_consumed_energy(host1)); return 0; diff --git a/examples/s4u/energy-exec/s4u-energy-exec.cpp b/examples/s4u/energy-exec/s4u-energy-exec.cpp index 846bc6db2f..1a30be2076 100644 --- a/examples/s4u/energy-exec/s4u-energy-exec.cpp +++ b/examples/s4u/energy-exec/s4u-energy-exec.cpp @@ -31,12 +31,12 @@ static void dvfs() XBT_INFO("Task done (duration: %.2f s). Current peak speed=%.0E flop/s; Current consumption: from %.0fW to %.0fW" " depending on load; Energy dissipated=%.0f J", simgrid::s4u::Engine::get_clock() - start, host1->getSpeed(), - sg_host_get_wattmin_at(host1, host1->getPstate()), sg_host_get_wattmax_at(host1, host1->getPstate()), + sg_host_get_wattmin_at(host1, host1->get_pstate()), sg_host_get_wattmax_at(host1, host1->get_pstate()), sg_host_get_consumed_energy(host1)); // ========= Change power peak ========= int pstate = 2; - host1->setPstate(pstate); + host1->set_pstate(pstate); XBT_INFO("========= Requesting pstate %d (speed should be of %.0E flop/s and is of %.0E flop/s)", pstate, host1->getPstateSpeed(pstate), host1->getSpeed()); diff --git a/examples/s4u/exec-dvfs/s4u-exec-dvfs.cpp b/examples/s4u/exec-dvfs/s4u-exec-dvfs.cpp index c9d712fc76..81abcf61a3 100644 --- a/examples/s4u/exec-dvfs/s4u-exec-dvfs.cpp +++ b/examples/s4u/exec-dvfs/s4u-exec-dvfs.cpp @@ -12,7 +12,7 @@ static int dvfs() double workload = 100E6; simgrid::s4u::Host* host = simgrid::s4u::this_actor::get_host(); - int nb = host->getPstatesCount(); + int nb = host->get_pstate_count(); XBT_INFO("Count of Processor states=%d", nb); XBT_INFO("Current power peak=%f", host->getSpeed()); @@ -28,7 +28,7 @@ static int dvfs() XBT_INFO("Changing power peak value to %f (at index %d)", host->getPstateSpeed(new_pstate), new_pstate); - host->setPstate(new_pstate); + host->set_pstate(new_pstate); XBT_INFO("Current power peak=%f", host->getSpeed()); @@ -40,7 +40,7 @@ static int dvfs() // Verify that the default pstate is set to 0 host = simgrid::s4u::Host::by_name_or_null("MyHost2"); - XBT_INFO("Count of Processor states=%d", host->getPstatesCount()); + XBT_INFO("Count of Processor states=%d", host->get_pstate_count()); XBT_INFO("Current power peak=%f", host->getSpeed()); return 0; diff --git a/examples/s4u/plugin-hostload/s4u-plugin-hostload.cpp b/examples/s4u/plugin-hostload/s4u-plugin-hostload.cpp index c18578597b..ac8962a5e1 100644 --- a/examples/s4u/plugin-hostload/s4u-plugin-hostload.cpp +++ b/examples/s4u/plugin-hostload/s4u-plugin-hostload.cpp @@ -35,12 +35,12 @@ static void execute_load_test() simgrid::s4u::Engine::get_clock() - start, host->getSpeed(), speed, sg_host_get_computed_flops(host), sg_host_get_avg_load(host), static_cast(200E6) / - (10.5 * speed * host->getCoreCount() + - (simgrid::s4u::Engine::get_clock() - start - 0.5) * host->getSpeed() * host->getCoreCount())); + (10.5 * speed * host->get_core_count() + + (simgrid::s4u::Engine::get_clock() - start - 0.5) * host->getSpeed() * host->get_core_count())); // ========= Change power peak ========= int pstate = 1; - host->setPstate(pstate); + host->set_pstate(pstate); XBT_INFO("========= Requesting pstate %d (speed should be of %.0E flop/s and is of %.0E flop/s, average load is %.5f)", pstate, host->getPstateSpeed(pstate), host->getSpeed(), sg_host_get_avg_load(host)); @@ -78,7 +78,7 @@ static void change_speed() simgrid::s4u::this_actor::sleep_for(10.5); XBT_INFO("I slept until now, but now I'll change the speed of this host " "while the other process is still computing! This should slow the computation down."); - host->setPstate(2); + host->set_pstate(2); } int main(int argc, char* argv[]) diff --git a/examples/simdag/test/sd_test.cpp b/examples/simdag/test/sd_test.cpp index ea379dc4e4..35ce7c0237 100644 --- a/examples/simdag/test/sd_test.cpp +++ b/examples/simdag/test/sd_test.cpp @@ -39,7 +39,7 @@ int main(int argc, char **argv) XBT_INFO("Route between %s and %s:", h1->get_cname(), h2->get_cname()); std::vector route; double latency = 0; - h1->routeTo(h2, route, &latency); + h1->route_to(h2, route, &latency); for (auto const& link : route) XBT_INFO(" Link %s: latency = %f, bandwidth = %f", sg_link_name(link), sg_link_latency(link), diff --git a/include/simgrid/s4u/Host.hpp b/include/simgrid/s4u/Host.hpp index ab6cb8b886..87f6cbb544 100644 --- a/include/simgrid/s4u/Host.hpp +++ b/include/simgrid/s4u/Host.hpp @@ -102,12 +102,12 @@ public: double getSpeed(); double get_available_speed(); - int getCoreCount(); + int get_core_count(); double getPstateSpeed(int pstate_index); - int getPstatesCount() const; - void setPstate(int pstate_index); - int getPstate(); + int get_pstate_count() const; + void set_pstate(int pstate_index); + int get_pstate(); std::vector get_attached_storages(); XBT_ATTRIB_DEPRECATED_v323("Please use Host::get_attached_storages() instead.") void getAttachedStorages( @@ -119,8 +119,8 @@ public: */ std::unordered_map const& getMountedStorages(); - void routeTo(Host* dest, std::vector& links, double* latency); - void routeTo(Host* dest, std::vector& links, double* latency); + void route_to(Host* dest, std::vector& links, double* latency); + void route_to(Host* dest, std::vector& links, double* latency); /** Block the calling actor on an execution located on the called host * @@ -159,6 +159,24 @@ public: { set_property(key, value); } + XBT_ATTRIB_DEPRECATED_v323("Please use Host::set_pstate()") void setPstate(int idx) { set_pstate(idx); } + XBT_ATTRIB_DEPRECATED_v323("Please use Host::get_pstate()") int getPstate() { return get_pstate(); } + + XBT_ATTRIB_DEPRECATED_v323("Please use Host::route_to()") void routeTo(Host* dest, std::vector& links, + double* latency) + { + route_to(dest, links, latency); + } + XBT_ATTRIB_DEPRECATED_v323("Please use Host::route_to()") void routeTo( + Host* dest, std::vector& links, double* latency) + { + route_to(dest, links, latency); + } + XBT_ATTRIB_DEPRECATED_v323("Please use Host::get_core_count()") int getCoreCount() { return get_core_count(); } + XBT_ATTRIB_DEPRECATED_v323("Please use Host::get_pstate_count()") int getPstatesCount() const + { + return get_pstate_count(); + } private: simgrid::xbt::string name_{"noname"}; diff --git a/src/instr/instr_platform.cpp b/src/instr/instr_platform.cpp index 7bbf6bf3c4..985c506ab1 100644 --- a/src/instr/instr_platform.cpp +++ b/src/instr/instr_platform.cpp @@ -229,7 +229,7 @@ static void instr_host_on_speed_change(simgrid::s4u::Host& host) { simgrid::instr::Container::by_name(host.get_cname()) ->get_variable("power") - ->set_event(surf_get_clock(), host.getCoreCount() * host.get_available_speed()); + ->set_event(surf_get_clock(), host.get_core_count() * host.get_available_speed()); } static void instr_cpu_action_on_state_change(simgrid::surf::CpuAction* action, diff --git a/src/plugins/vm/s4u_VirtualMachine.cpp b/src/plugins/vm/s4u_VirtualMachine.cpp index 5119271516..af766857f4 100644 --- a/src/plugins/vm/s4u_VirtualMachine.cpp +++ b/src/plugins/vm/s4u_VirtualMachine.cpp @@ -36,12 +36,12 @@ VirtualMachine::VirtualMachine(const char* name, s4u::Host* pm, int coreAmount, // Create a VCPU for this VM std::vector speeds; - for (int i = 0; i < pm->getPstatesCount(); i++) + for (int i = 0; i < pm->get_pstate_count(); i++) speeds.push_back(pm->getPstateSpeed(i)); - surf_cpu_model_vm->create_cpu(this, &speeds, pm->getCoreCount()); - if (pm->getPstate() != 0) - setPstate(pm->getPstate()); + surf_cpu_model_vm->create_cpu(this, &speeds, pm->get_core_count()); + if (pm->get_pstate() != 0) + set_pstate(pm->get_pstate()); /* Make a process container */ extension_set(new simgrid::simix::Host()); diff --git a/src/s4u/s4u_Host.cpp b/src/s4u/s4u_Host.cpp index 3ac5c472ff..f345566b9d 100644 --- a/src/s4u/s4u_Host.cpp +++ b/src/s4u/s4u_Host.cpp @@ -131,7 +131,7 @@ bool Host::is_on() return this->pimpl_cpu->is_on(); } -int Host::getPstatesCount() const +int Host::get_pstate_count() const { return this->pimpl_cpu->get_pstates_count(); } @@ -183,16 +183,16 @@ void Host::actorList(std::vector* whereto) * walk through the routing components tree and find a route between hosts * by calling each "get_route" function in each routing component. */ -void Host::routeTo(Host* dest, std::vector& links, double* latency) +void Host::route_to(Host* dest, std::vector& links, double* latency) { std::vector linkImpls; - this->routeTo(dest, linkImpls, latency); + this->route_to(dest, linkImpls, latency); for (kernel::resource::LinkImpl* const& l : linkImpls) links.push_back(&l->piface_); } /** @brief Just like Host::routeTo, but filling an array of link implementations */ -void Host::routeTo(Host* dest, std::vector& links, double* latency) +void Host::route_to(Host* dest, std::vector& links, double* latency) { simgrid::kernel::routing::NetZoneImpl::get_global_route(pimpl_netpoint, dest->pimpl_netpoint, links, latency); if (XBT_LOG_ISENABLED(surf_route, xbt_log_priority_debug)) { @@ -244,18 +244,18 @@ double Host::get_available_speed() } /** @brief Returns the number of core of the processor. */ -int Host::getCoreCount() +int Host::get_core_count() { return this->pimpl_cpu->get_cores_count(); } /** @brief Set the pstate at which the host should run */ -void Host::setPstate(int pstate_index) +void Host::set_pstate(int pstate_index) { simgrid::simix::simcall([this, pstate_index] { this->pimpl_cpu->set_pstate(pstate_index); }); } /** @brief Retrieve the pstate at which the host is currently running */ -int Host::getPstate() +int Host::get_pstate() { return this->pimpl_cpu->get_pstate(); } @@ -439,7 +439,7 @@ double sg_host_get_pstate_speed(sg_host_t host, int pstate_index) */ int sg_host_core_count(sg_host_t host) { - return host->getCoreCount(); + return host->get_core_count(); } double sg_host_get_available_speed(sg_host_t host) @@ -453,7 +453,7 @@ double sg_host_get_available_speed(sg_host_t host) */ int sg_host_get_nb_pstates(sg_host_t host) { - return host->getPstatesCount(); + return host->get_pstate_count(); } /** @brief Gets the pstate at which that host currently runs. @@ -462,7 +462,7 @@ int sg_host_get_nb_pstates(sg_host_t host) */ int sg_host_get_pstate(sg_host_t host) { - return host->getPstate(); + return host->get_pstate(); } /** @brief Sets the pstate at which that host should run. * @@ -470,7 +470,7 @@ int sg_host_get_pstate(sg_host_t host) */ void sg_host_set_pstate(sg_host_t host, int pstate) { - host->setPstate(pstate); + host->set_pstate(pstate); } /** \ingroup m_host_management @@ -562,7 +562,7 @@ void sg_host_set_property_value(sg_host_t host, const char* name, const char* va void sg_host_route(sg_host_t from, sg_host_t to, xbt_dynar_t links) { std::vector vlinks; - from->routeTo(to, vlinks, nullptr); + from->route_to(to, vlinks, nullptr); for (auto const& link : vlinks) xbt_dynar_push(links, &link); } @@ -576,7 +576,7 @@ double sg_host_route_latency(sg_host_t from, sg_host_t to) { std::vector vlinks; double res = 0; - from->routeTo(to, vlinks, &res); + from->route_to(to, vlinks, &res); return res; } /** @@ -590,7 +590,7 @@ double sg_host_route_bandwidth(sg_host_t from, sg_host_t to) double min_bandwidth = -1.0; std::vector vlinks; - from->routeTo(to, vlinks, nullptr); + from->route_to(to, vlinks, nullptr); for (auto const& link : vlinks) { double bandwidth = link->get_bandwidth(); if (bandwidth < min_bandwidth || min_bandwidth < 0.0) diff --git a/src/surf/network_cm02.cpp b/src/surf/network_cm02.cpp index 2eed509631..a0c0de0650 100644 --- a/src/surf/network_cm02.cpp +++ b/src/surf/network_cm02.cpp @@ -225,7 +225,7 @@ Action* NetworkCm02Model::communicate(s4u::Host* src, s4u::Host* dst, double siz XBT_IN("(%s,%s,%g,%g)", src->get_cname(), dst->get_cname(), size, rate); - src->routeTo(dst, route, &latency); + src->route_to(dst, route, &latency); xbt_assert(not route.empty() || latency, "You're trying to send data from %s to %s but there is no connecting path between these two hosts.", src->get_cname(), dst->get_cname()); @@ -233,7 +233,7 @@ Action* NetworkCm02Model::communicate(s4u::Host* src, s4u::Host* dst, double siz bool failed = std::any_of(route.begin(), route.end(), [](LinkImpl* link) { return link->is_off(); }); if (cfg_crosstraffic) { - dst->routeTo(src, back_route, nullptr); + dst->route_to(src, back_route, nullptr); if (not failed) failed = std::any_of(back_route.begin(), back_route.end(), [](LinkImpl* const& link) { return link->is_off(); }); } diff --git a/src/surf/plugins/host_dvfs.cpp b/src/surf/plugins/host_dvfs.cpp index af8ccc4a6d..e23921f78c 100644 --- a/src/surf/plugins/host_dvfs.cpp +++ b/src/surf/plugins/host_dvfs.cpp @@ -69,7 +69,7 @@ class Performance : public Governor { public: explicit Performance(simgrid::s4u::Host* ptr) : Governor(ptr) {} - void update() override { get_host()->setPstate(0); } + void update() override { get_host()->set_pstate(0); } std::string getName() override { return "Performance"; } }; @@ -87,7 +87,7 @@ class Powersave : public Governor { public: explicit Powersave(simgrid::s4u::Host* ptr) : Governor(ptr) {} - void update() override { get_host()->setPstate(get_host()->getPstatesCount() - 1); } + void update() override { get_host()->set_pstate(get_host()->get_pstate_count() - 1); } std::string getName() override { return "Powersave"; } }; @@ -113,11 +113,11 @@ public: std::string getName() override { return "OnDemand"; } void update() override { - double load = get_host()->getCoreCount() * sg_host_get_avg_load(get_host()); + double load = get_host()->get_core_count() * sg_host_get_avg_load(get_host()); sg_host_load_reset(get_host()); // Only consider the period between two calls to this method! if (load > freq_up_threshold) { - get_host()->setPstate(0); /* Run at max. performance! */ + get_host()->set_pstate(0); /* Run at max. performance! */ XBT_INFO("Load: %f > threshold: %f --> changed to pstate %i", load, freq_up_threshold, 0); } else { /* The actual implementation uses a formula here: (See Kernel file cpufreq_ondemand.c:158) @@ -127,11 +127,11 @@ public: * So they assume that frequency increases by 100 MHz. We will just use * lowest_pstate - load*pstatesCount() */ - int max_pstate = get_host()->getPstatesCount() - 1; + int max_pstate = get_host()->get_pstate_count() - 1; // Load is now < freq_up_threshold; exclude pstate 0 (the fastest) // because pstate 0 can only be selected if load > freq_up_threshold int new_pstate = max_pstate - load * (max_pstate + 1); - get_host()->setPstate(new_pstate); + get_host()->set_pstate(new_pstate); XBT_DEBUG("Load: %f < threshold: %f --> changed to pstate %i", load, freq_up_threshold, new_pstate); } @@ -160,22 +160,22 @@ public: virtual std::string getName() override { return "Conservative"; } virtual void update() override { - double load = get_host()->getCoreCount() * sg_host_get_avg_load(get_host()); - int pstate = get_host()->getPstate(); + double load = get_host()->get_core_count() * sg_host_get_avg_load(get_host()); + int pstate = get_host()->get_pstate(); sg_host_load_reset(get_host()); // Only consider the period between two calls to this method! if (load > freq_up_threshold) { if (pstate != 0) { - get_host()->setPstate(pstate - 1); + get_host()->set_pstate(pstate - 1); XBT_INFO("Load: %f > threshold: %f -> increasing performance to pstate %d", load, freq_up_threshold, pstate - 1); } else { XBT_DEBUG("Load: %f > threshold: %f -> but cannot speed up even more, already in highest pstate %d", load, freq_up_threshold, pstate); } } else if (load < freq_down_threshold) { - int max_pstate = get_host()->getPstatesCount() - 1; + int max_pstate = get_host()->get_pstate_count() - 1; if (pstate != max_pstate) { // Are we in the slowest pstate already? - get_host()->setPstate(pstate + 1); + get_host()->set_pstate(pstate + 1); XBT_INFO("Load: %f < threshold: %f -> slowing down to pstate %d", load, freq_down_threshold, pstate + 1); } else { diff --git a/src/surf/plugins/host_energy.cpp b/src/surf/plugins/host_energy.cpp index 4f4ecc9092..dcd67a3936 100644 --- a/src/surf/plugins/host_energy.cpp +++ b/src/surf/plugins/host_energy.cpp @@ -176,7 +176,7 @@ void HostEnergy::update() } /* Save data for the upcoming time interval: whether it's on/off and the pstate if it's on */ - this->pstate = host->is_on() ? host->getPstate() : pstate_off; + this->pstate = host->is_on() ? host->get_pstate() : pstate_off; } HostEnergy::HostEnergy(simgrid::s4u::Host* ptr) : host(ptr), last_updated(surf_get_clock()) @@ -286,7 +286,7 @@ double HostEnergy::getCurrentWattsValue(double cpu_load) * (maxCpuLoad is by definition 1) */ double power_slope; - int coreCount = host->getCoreCount(); + int coreCount = host->get_core_count(); double coreReciprocal = static_cast(1) / static_cast(coreCount); if (coreCount > 1) power_slope = (max_power - min_power) / (1 - coreReciprocal); @@ -320,14 +320,14 @@ void HostEnergy::initWattsRangeList() std::vector all_power_values; boost::split(all_power_values, all_power_values_str, boost::is_any_of(",")); - XBT_DEBUG("%s: profile: %s, cores: %d", host->get_cname(), all_power_values_str, host->getCoreCount()); + XBT_DEBUG("%s: profile: %s, cores: %d", host->get_cname(), all_power_values_str, host->get_core_count()); int i = 0; for (auto const& current_power_values_str : all_power_values) { /* retrieve the power values associated with the current pstate */ std::vector current_power_values; boost::split(current_power_values, current_power_values_str, boost::is_any_of(":")); - if (host->getCoreCount() == 1) { + if (host->get_core_count() == 1) { xbt_assert(current_power_values.size() == 2 || current_power_values.size() == 3, "Power properties incorrectly defined for host %s." "It should be 'Idle:FullSpeed' power values because you have one core only.", diff --git a/src/surf/plugins/host_load.cpp b/src/surf/plugins/host_load.cpp index d915b593b3..a728f25c33 100644 --- a/src/surf/plugins/host_load.cpp +++ b/src/surf/plugins/host_load.cpp @@ -73,7 +73,7 @@ void HostLoad::update() idle_time += (now - last_updated); } - theor_max_flops += current_speed * host->getCoreCount() * (now - last_updated); + theor_max_flops += current_speed * host->get_core_count() * (now - last_updated); current_speed = host->getSpeed(); last_updated = now; was_prev_idle = (current_flops == 0); @@ -93,7 +93,7 @@ double HostLoad::getCurrentLoad() // We don't need to call update() here because it is called everytime an // action terminates or starts // FIXME: Can this happen at the same time? stop -> call to getCurrentLoad, load = 0 -> next action starts? - return current_flops / static_cast(host->getSpeed() * host->getCoreCount()); + return current_flops / static_cast(host->getSpeed() * host->get_core_count()); } /** diff --git a/src/surf/ptask_L07.cpp b/src/surf/ptask_L07.cpp index 22b73e9c5b..9338334758 100644 --- a/src/surf/ptask_L07.cpp +++ b/src/surf/ptask_L07.cpp @@ -165,7 +165,7 @@ L07Action::L07Action(kernel::resource::Model* model, int host_nb, sg_host_t* hos double lat=0.0; std::vector route; - hostList_->at(i)->routeTo(hostList_->at(j), route, &lat); + hostList_->at(i)->route_to(hostList_->at(j), route, &lat); latency = std::max(latency, lat); for (auto const& link : route) @@ -193,7 +193,7 @@ L07Action::L07Action(kernel::resource::Model* model, int host_nb, sg_host_t* hos for (int j = 0; j < host_nb; j++) { if (bytes_amount[i * host_nb + j] > 0.0) { std::vector route; - hostList_->at(i)->routeTo(hostList_->at(j), route, nullptr); + hostList_->at(i)->route_to(hostList_->at(j), route, nullptr); for (auto const& link : route) model->get_maxmin_system()->expand_add(link->get_constraint(), this->get_variable(), @@ -394,7 +394,7 @@ void L07Action::updateBound() if (communicationAmount_[i * hostNb + j] > 0) { double lat = 0.0; std::vector route; - hostList_->at(i)->routeTo(hostList_->at(j), route, &lat); + hostList_->at(i)->route_to(hostList_->at(j), route, &lat); lat_current = std::max(lat_current, lat * communicationAmount_[i * hostNb + j]); } diff --git a/teshsuite/simdag/flatifier/flatifier.cpp b/teshsuite/simdag/flatifier/flatifier.cpp index b7bf33b324..7ed0610e15 100644 --- a/teshsuite/simdag/flatifier/flatifier.cpp +++ b/teshsuite/simdag/flatifier/flatifier.cpp @@ -56,8 +56,8 @@ static void dump_hosts() for (unsigned int i = 0; i < totalHosts; i++) { std::printf(" get_cname(), sg_host_speed(hosts[i])); props = hosts[i]->getProperties(); - if (hosts[i]->getCoreCount() > 1) { - std::printf(" core=\"%d\"", hosts[i]->getCoreCount()); + if (hosts[i]->get_core_count() > 1) { + std::printf(" core=\"%d\"", hosts[i]->get_core_count()); } if (props && not props->empty()) { std::printf(">\n");