Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix misspelling of "occurring".
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sat, 19 Oct 2019 21:55:52 +0000 (23:55 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sun, 20 Oct 2019 20:53:14 +0000 (22:53 +0200)
21 files changed:
include/simgrid/kernel/resource/Model.hpp
src/kernel/resource/Model.cpp
src/plugins/vm/VirtualMachineImpl.cpp
src/plugins/vm/VirtualMachineImpl.hpp
src/surf/cpu_ti.cpp
src/surf/cpu_ti.hpp
src/surf/disk_s19.cpp
src/surf/disk_s19.hpp
src/surf/host_clm03.cpp
src/surf/host_clm03.hpp
src/surf/network_constant.cpp
src/surf/network_constant.hpp
src/surf/network_interface.cpp
src/surf/network_interface.hpp
src/surf/network_ns3.cpp
src/surf/network_ns3.hpp
src/surf/ptask_L07.cpp
src/surf/ptask_L07.hpp
src/surf/storage_n11.cpp
src/surf/storage_n11.hpp
src/surf/surf_c_bindings.cpp

index 5d4990a..a226509 100644 (file)
@@ -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<lmm::System> maxmin_system_;
index 6f392e4..e17361d 100644 (file)
@@ -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();
 
index 2776c8d..9a4c1d0 100644 (file)
@@ -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);
 }
 
 /************
index 6606520..615d0f2 100644 (file)
@@ -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{};
 };
 }
index 765354b..b97d8fa 100644 (file)
@@ -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;
 
index 3d67ee3..d2cfa0e 100644 (file)
@@ -145,7 +145,7 @@ public:
   CpuTiModel& operator=(const CpuTiModel&) = delete;
   ~CpuTiModel() override;
   Cpu* create_cpu(s4u::Host* host, const std::vector<double>& 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_;
index 4198e10..aabe4f8 100644 (file)
@@ -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)
index 5b537ef..b14d6f9 100644 (file)
@@ -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;
 };
 
index 955e6b8..d7f2995 100644 (file)
@@ -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,
index 781384d..65ed7f5 100644 (file)
@@ -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;
 };
 }
index 849b015..4426bda 100644 (file)
@@ -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()) {
index 624b34b..ac6b625 100644 (file)
@@ -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<double>& bws, double lat,
index 54f8229..5a23538 100644 (file)
@@ -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<const NetworkAction&>(action);
index c473874..8d38ef6 100644 (file)
@@ -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;
 };
index b5b029f..9e9aa53 100644 (file)
@@ -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
 
index b565c97..0f9900c 100644 (file)
@@ -21,8 +21,8 @@ public:
   LinkImpl* create_link(const std::string& name, const std::vector<double>& 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;
 };
 
index 85c2bc3..260757a 100644 (file)
@@ -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<const L07Action&>(action);
     if (net_action.latency_ > 0 && (min < 0 || net_action.latency_ < min)) {
index c96ca41..2caab73 100644 (file)
@@ -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<s4u::Host*>& host_list, const double* flops_amount,
                                                 const double* bytes_amount, double rate) override;
index 668366d..22246c5 100644 (file)
@@ -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)
index 6ac7cc7..fdd2abf 100644 (file)
@@ -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;
 };
 
index f559bb2..588764b 100644 (file)
@@ -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;