From: Arnaud Giersch Date: Sat, 19 Oct 2019 21:55:52 +0000 (+0200) Subject: Fix misspelling of "occurring". X-Git-Tag: v3.25~510 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/39f579ce40d3bd04d9f64a7914b07d1ec3334e4b?hp=4e62e76d104a17f0c9aaf9135ac605e9c8c87141 Fix misspelling of "occurring". --- diff --git a/include/simgrid/kernel/resource/Model.hpp b/include/simgrid/kernel/resource/Model.hpp index 5d4990a27a..a226509ebe 100644 --- a/include/simgrid/kernel/resource/Model.hpp +++ b/include/simgrid/kernel/resource/Model.hpp @@ -70,9 +70,22 @@ public: * @param now The current time of the simulation * @return The delta of time till the next action will finish */ - virtual double next_occuring_event(double now); - virtual double next_occuring_event_lazy(double now); - virtual double next_occuring_event_full(double now); + virtual double next_occurring_event(double now); + virtual double next_occurring_event_lazy(double now); + virtual double next_occurring_event_full(double now); + + XBT_ATTRIB_DEPRECATED_v329("Please use next_occurring_event()") double next_occuring_event(double now) + { + return next_occurring_event(now); + } + XBT_ATTRIB_DEPRECATED_v329("Please use next_occurring_event_lazy()") double next_occuring_event_lazy(double now) + { + return next_occurring_event_lazy(now); + } + XBT_ATTRIB_DEPRECATED_v329("Please use next_occurring_event_full()") double next_occuring_event_full(double now) + { + return next_occurring_event_full(now); + } private: Action* extract_action(Action::StateSet* list); @@ -96,7 +109,12 @@ public: * The only model that is not is ns-3: computing the next timestamp moves the model up to that point, * so we need to call it only when the next timestamp of other sources is computed. */ - virtual bool next_occuring_event_is_idempotent() { return true; } + virtual bool next_occurring_event_is_idempotent() { return true; } + + XBT_ATTRIB_DEPRECATED_v329("Please use next_occurring_event_is_idempotent()") bool next_occuring_event_is_idempotent() + { + return next_occurring_event_is_idempotent(); + } private: std::unique_ptr maxmin_system_; diff --git a/src/kernel/resource/Model.cpp b/src/kernel/resource/Model.cpp index 6f392e4ca6..e17361db05 100644 --- a/src/kernel/resource/Model.cpp +++ b/src/kernel/resource/Model.cpp @@ -26,18 +26,18 @@ void Model::set_maxmin_system(lmm::System* system) maxmin_system_.reset(system); } -double Model::next_occuring_event(double now) +double Model::next_occurring_event(double now) { // FIXME: set the good function once and for all if (update_algorithm_ == Model::UpdateAlgo::LAZY) - return next_occuring_event_lazy(now); + return next_occurring_event_lazy(now); else if (update_algorithm_ == Model::UpdateAlgo::FULL) - return next_occuring_event_full(now); + return next_occurring_event_full(now); else xbt_die("Invalid cpu update mechanism!"); } -double Model::next_occuring_event_lazy(double now) +double Model::next_occurring_event_lazy(double now) { XBT_DEBUG("Before share resources, the size of modified actions set is %zu", maxmin_system_->modified_set_->size()); maxmin_system_->lmm_solve(); @@ -100,7 +100,7 @@ double Model::next_occuring_event_lazy(double now) } } -double Model::next_occuring_event_full(double /*now*/) +double Model::next_occurring_event_full(double /*now*/) { maxmin_system_->solve(); diff --git a/src/plugins/vm/VirtualMachineImpl.cpp b/src/plugins/vm/VirtualMachineImpl.cpp index 2776c8dfef..9a4c1d0ae8 100644 --- a/src/plugins/vm/VirtualMachineImpl.cpp +++ b/src/plugins/vm/VirtualMachineImpl.cpp @@ -108,7 +108,7 @@ VMModel::VMModel() kernel::activity::ActivityImpl::on_suspended.connect(remove_active_activity); } -double VMModel::next_occuring_event(double now) +double VMModel::next_occurring_event(double now) { /* TODO: update action's cost with the total cost of processes on the VM. */ @@ -149,7 +149,7 @@ double VMModel::next_occuring_event(double now) } /* 2. Ready. Get the next occurring event */ - return surf_cpu_model_vm->next_occuring_event(now); + return surf_cpu_model_vm->next_occurring_event(now); } /************ diff --git a/src/plugins/vm/VirtualMachineImpl.hpp b/src/plugins/vm/VirtualMachineImpl.hpp index 6606520bea..615d0f2fe3 100644 --- a/src/plugins/vm/VirtualMachineImpl.hpp +++ b/src/plugins/vm/VirtualMachineImpl.hpp @@ -82,7 +82,7 @@ class XBT_PRIVATE VMModel : public surf::HostModel { public: VMModel(); - double next_occuring_event(double now) override; + double next_occurring_event(double now) override; void update_actions_state(double /*now*/, double /*delta*/) override{}; }; } diff --git a/src/surf/cpu_ti.cpp b/src/surf/cpu_ti.cpp index 765354bbf2..b97d8fa965 100644 --- a/src/surf/cpu_ti.cpp +++ b/src/surf/cpu_ti.cpp @@ -291,7 +291,7 @@ kernel::resource::Cpu* CpuTiModel::create_cpu(s4u::Host* host, const std::vector return new CpuTi(this, host, speed_per_pstate, core); } -double CpuTiModel::next_occuring_event(double now) +double CpuTiModel::next_occurring_event(double now) { double min_action_duration = -1; diff --git a/src/surf/cpu_ti.hpp b/src/surf/cpu_ti.hpp index 3d67ee316f..d2cfa0e045 100644 --- a/src/surf/cpu_ti.hpp +++ b/src/surf/cpu_ti.hpp @@ -145,7 +145,7 @@ public: CpuTiModel& operator=(const CpuTiModel&) = delete; ~CpuTiModel() override; Cpu* create_cpu(s4u::Host* host, const std::vector& speed_per_pstate, int core) override; - double next_occuring_event(double now) override; + double next_occurring_event(double now) override; void update_actions_state(double now, double delta) override; CpuTiList modified_cpus_; diff --git a/src/surf/disk_s19.cpp b/src/surf/disk_s19.cpp index 4198e10035..aabe4f8567 100644 --- a/src/surf/disk_s19.cpp +++ b/src/surf/disk_s19.cpp @@ -38,9 +38,9 @@ DiskImpl* DiskS19Model::createDisk(const std::string& id, double read_bw, double return new DiskS19(this, id, get_maxmin_system(), read_bw, write_bw); } -double DiskS19Model::next_occuring_event(double now) +double DiskS19Model::next_occurring_event(double now) { - return DiskModel::next_occuring_event_full(now); + return DiskModel::next_occurring_event_full(now); } void DiskS19Model::update_actions_state(double /*now*/, double delta) diff --git a/src/surf/disk_s19.hpp b/src/surf/disk_s19.hpp index 5b537ef58a..b14d6f9ed5 100644 --- a/src/surf/disk_s19.hpp +++ b/src/surf/disk_s19.hpp @@ -30,7 +30,7 @@ class DiskS19Model : public DiskModel { public: DiskS19Model(); DiskImpl* createDisk(const std::string& id, double read_bw, double write_bw) override; - double next_occuring_event(double now) override; + double next_occurring_event(double now) override; void update_actions_state(double now, double delta) override; }; diff --git a/src/surf/host_clm03.cpp b/src/surf/host_clm03.cpp index 955e6b8252..d7f29954ee 100644 --- a/src/surf/host_clm03.cpp +++ b/src/surf/host_clm03.cpp @@ -30,13 +30,13 @@ HostCLM03Model::HostCLM03Model() { all_existing_models.push_back(this); } -double HostCLM03Model::next_occuring_event(double now) +double HostCLM03Model::next_occurring_event(double now) { - double min_by_cpu = surf_cpu_model_pm->next_occuring_event(now); + double min_by_cpu = surf_cpu_model_pm->next_occurring_event(now); double min_by_net = - surf_network_model->next_occuring_event_is_idempotent() ? surf_network_model->next_occuring_event(now) : -1; - double min_by_sto = surf_storage_model->next_occuring_event(now); - double min_by_dsk = surf_disk_model->next_occuring_event(now); + surf_network_model->next_occurring_event_is_idempotent() ? surf_network_model->next_occurring_event(now) : -1; + double min_by_sto = surf_storage_model->next_occurring_event(now); + double min_by_dsk = surf_disk_model->next_occurring_event(now); XBT_DEBUG("model %p, %s min_by_cpu %f, %s min_by_net %f, %s min_by_sto %f, %s min_by_dsk %f", this, typeid(surf_cpu_model_pm).name(), min_by_cpu, typeid(surf_network_model).name(), min_by_net, diff --git a/src/surf/host_clm03.hpp b/src/surf/host_clm03.hpp index 781384d151..65ed7f5ae6 100644 --- a/src/surf/host_clm03.hpp +++ b/src/surf/host_clm03.hpp @@ -18,7 +18,7 @@ namespace surf { class XBT_PRIVATE HostCLM03Model : public HostModel { public: HostCLM03Model(); - double next_occuring_event(double now) override; + double next_occurring_event(double now) override; void update_actions_state(double now, double delta) override; }; } diff --git a/src/surf/network_constant.cpp b/src/surf/network_constant.cpp index 849b015b06..4426bda2bc 100644 --- a/src/surf/network_constant.cpp +++ b/src/surf/network_constant.cpp @@ -37,7 +37,7 @@ LinkImpl* NetworkConstantModel::create_link(const std::string& name, const std:: return nullptr; } -double NetworkConstantModel::next_occuring_event(double /*now*/) +double NetworkConstantModel::next_occurring_event(double /*now*/) { double min = -1.0; for (kernel::resource::Action const& action : *get_started_action_set()) { diff --git a/src/surf/network_constant.hpp b/src/surf/network_constant.hpp index 624b34bd30..ac6b625152 100644 --- a/src/surf/network_constant.hpp +++ b/src/surf/network_constant.hpp @@ -18,7 +18,7 @@ class NetworkConstantModel : public NetworkModel { public: NetworkConstantModel(); Action* communicate(s4u::Host* src, s4u::Host* dst, double size, double rate) override; - double next_occuring_event(double now) override; + double next_occurring_event(double now) override; void update_actions_state(double now, double delta) override; LinkImpl* create_link(const std::string& name, const std::vector& bws, double lat, diff --git a/src/surf/network_interface.cpp b/src/surf/network_interface.cpp index 54f82296d3..5a23538984 100644 --- a/src/surf/network_interface.cpp +++ b/src/surf/network_interface.cpp @@ -54,9 +54,9 @@ double NetworkModel::get_bandwidth_constraint(double rate, double /*bound*/, dou return rate; } -double NetworkModel::next_occuring_event_full(double now) +double NetworkModel::next_occurring_event_full(double now) { - double minRes = Model::next_occuring_event_full(now); + double minRes = Model::next_occurring_event_full(now); for (Action const& action : *get_started_action_set()) { const NetworkAction& net_action = static_cast(action); diff --git a/src/surf/network_interface.hpp b/src/surf/network_interface.hpp index c473874005..8d38ef6c6e 100644 --- a/src/surf/network_interface.hpp +++ b/src/surf/network_interface.hpp @@ -95,7 +95,7 @@ public: * @return The new bandwidth. */ virtual double get_bandwidth_constraint(double rate, double bound, double size); - double next_occuring_event_full(double now) override; + double next_occurring_event_full(double now) override; LinkImpl* loopback_ = nullptr; }; diff --git a/src/surf/network_ns3.cpp b/src/surf/network_ns3.cpp index b5b029f2a0..9e9aa53e84 100644 --- a/src/surf/network_ns3.cpp +++ b/src/surf/network_ns3.cpp @@ -191,10 +191,10 @@ Action* NetworkNS3Model::communicate(s4u::Host* src, s4u::Host* dst, double size return new NetworkNS3Action(this, size, src, dst); } -double NetworkNS3Model::next_occuring_event(double now) +double NetworkNS3Model::next_occurring_event(double now) { double time_to_next_flow_completion = 0.0; - XBT_DEBUG("ns3_next_occuring_event"); + XBT_DEBUG("ns3_next_occurring_event"); //get the first relevant value from the running_actions list diff --git a/src/surf/network_ns3.hpp b/src/surf/network_ns3.hpp index b565c976a6..0f9900c2b9 100644 --- a/src/surf/network_ns3.hpp +++ b/src/surf/network_ns3.hpp @@ -21,8 +21,8 @@ public: LinkImpl* create_link(const std::string& name, const std::vector& bandwidth, double latency, s4u::Link::SharingPolicy policy) override; Action* communicate(s4u::Host* src, s4u::Host* dst, double size, double rate) override; - double next_occuring_event(double now) override; - bool next_occuring_event_is_idempotent() override { return false; } + double next_occurring_event(double now) override; + bool next_occurring_event_is_idempotent() override { return false; } void update_actions_state(double now, double delta) override; }; diff --git a/src/surf/ptask_L07.cpp b/src/surf/ptask_L07.cpp index 85c2bc325b..260757a588 100644 --- a/src/surf/ptask_L07.cpp +++ b/src/surf/ptask_L07.cpp @@ -66,9 +66,9 @@ NetworkL07Model::~NetworkL07Model() set_maxmin_system(nullptr); } -double HostL07Model::next_occuring_event(double now) +double HostL07Model::next_occurring_event(double now) { - double min = HostModel::next_occuring_event_full(now); + double min = HostModel::next_occurring_event_full(now); for (kernel::resource::Action const& action : *get_started_action_set()) { const L07Action& net_action = static_cast(action); if (net_action.latency_ > 0 && (min < 0 || net_action.latency_ < min)) { diff --git a/src/surf/ptask_L07.hpp b/src/surf/ptask_L07.hpp index c96ca41bdf..2caab73a28 100644 --- a/src/surf/ptask_L07.hpp +++ b/src/surf/ptask_L07.hpp @@ -40,7 +40,7 @@ public: HostL07Model& operator=(const HostL07Model&) = delete; ~HostL07Model() override; - double next_occuring_event(double now) override; + double next_occurring_event(double now) override; void update_actions_state(double now, double delta) override; kernel::resource::CpuAction* execute_parallel(const std::vector& host_list, const double* flops_amount, const double* bytes_amount, double rate) override; diff --git a/src/surf/storage_n11.cpp b/src/surf/storage_n11.cpp index 668366d7f4..22246c57d7 100644 --- a/src/surf/storage_n11.cpp +++ b/src/surf/storage_n11.cpp @@ -66,9 +66,9 @@ StorageImpl* StorageN11Model::createStorage(const std::string& id, const std::st attach); } -double StorageN11Model::next_occuring_event(double now) +double StorageN11Model::next_occurring_event(double now) { - return StorageModel::next_occuring_event_full(now); + return StorageModel::next_occurring_event_full(now); } void StorageN11Model::update_actions_state(double /*now*/, double delta) diff --git a/src/surf/storage_n11.hpp b/src/surf/storage_n11.hpp index 6ac7cc7b60..fdd2abf20d 100644 --- a/src/surf/storage_n11.hpp +++ b/src/surf/storage_n11.hpp @@ -31,7 +31,7 @@ public: StorageN11Model(); StorageImpl* createStorage(const std::string& id, const std::string& type_id, const std::string& content_name, const std::string& attach) override; - double next_occuring_event(double now) override; + double next_occurring_event(double now) override; void update_actions_state(double now, double delta) override; }; diff --git a/src/surf/surf_c_bindings.cpp b/src/surf/surf_c_bindings.cpp index f559bb2231..588764b3d0 100644 --- a/src/surf/surf_c_bindings.cpp +++ b/src/surf/surf_c_bindings.cpp @@ -59,13 +59,13 @@ double surf_solve(double max_date) /* Physical models MUST be resolved first */ XBT_DEBUG("Looking for next event in physical models"); - double next_event_phy = surf_host_model->next_occuring_event(NOW); + double next_event_phy = surf_host_model->next_occurring_event(NOW); if ((time_delta < 0.0 || next_event_phy < time_delta) && next_event_phy >= 0.0) { time_delta = next_event_phy; } if (surf_vm_model != nullptr) { XBT_DEBUG("Looking for next event in virtual models"); - double next_event_virt = surf_vm_model->next_occuring_event(NOW); + double next_event_virt = surf_vm_model->next_occurring_event(NOW); if ((time_delta < 0.0 || next_event_virt < time_delta) && next_event_virt >= 0.0) time_delta = next_event_virt; } @@ -73,7 +73,7 @@ double surf_solve(double max_date) for (auto const& model : all_existing_models) { if (model != surf_host_model && model != surf_vm_model && model != surf_network_model && model != surf_storage_model && model != surf_disk_model) { - double next_event_model = model->next_occuring_event(NOW); + double next_event_model = model->next_occurring_event(NOW); if ((time_delta < 0.0 || next_event_model < time_delta) && next_event_model >= 0.0) time_delta = next_event_model; } @@ -87,7 +87,7 @@ double surf_solve(double max_date) double next_event_date = simgrid::kernel::profile::future_evt_set.next_date(); XBT_DEBUG("Next TRACE event: %f", next_event_date); - if (not surf_network_model->next_occuring_event_is_idempotent()) { // NS3, I see you + if (not surf_network_model->next_occurring_event_is_idempotent()) { // NS3, I see you if (next_event_date != -1.0) { time_delta = std::min(next_event_date - NOW, time_delta); } else { @@ -96,7 +96,7 @@ double surf_solve(double max_date) XBT_DEBUG("Run the NS3 network at most %fs", time_delta); // run until min or next flow - model_next_action_end = surf_network_model->next_occuring_event(time_delta); + model_next_action_end = surf_network_model->next_occurring_event(time_delta); XBT_DEBUG("Min for network : %f", model_next_action_end); if (model_next_action_end >= 0.0) @@ -114,7 +114,8 @@ double surf_solve(double max_date) while ((event = simgrid::kernel::profile::future_evt_set.pop_leq(next_event_date, &value, &resource))) { if (resource->is_used() || (watched_hosts.find(resource->get_cname()) != watched_hosts.end())) { time_delta = next_event_date - NOW; - XBT_DEBUG("This event invalidates the next_occuring_event() computation of models. Next event set to %f", time_delta); + XBT_DEBUG("This event invalidates the next_occurring_event() computation of models. Next event set to %f", + time_delta); } // FIXME: I'm too lame to update NOW live, so I change it and restore it so that the real update with surf_min will work double round_start = NOW;