Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix a gramatical error all over our variables
authorMartin Quinson <martin.quinson@loria.fr>
Wed, 23 May 2018 16:17:25 +0000 (18:17 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Wed, 23 May 2018 16:17:25 +0000 (18:17 +0200)
doc/tuto-msg/masterworker-sol1.c
doc/tuto-msg/masterworker-sol2.c
doc/tuto-msg/masterworker-sol3.c
doc/tuto-msg/masterworker-sol4.c
doc/tuto-msg/masterworker.c
src/s4u/s4u_Host.cpp
src/surf/cpu_cas01.cpp
src/surf/cpu_interface.cpp
src/surf/cpu_interface.hpp
src/surf/plugins/host_energy.cpp
teshsuite/msg/energy-ptask/energy-ptask.c

index 7441cab..180c61e 100644 (file)
@@ -43,23 +43,23 @@ static int master(int argc, char* argv[])
   }
 
   /* Get the info about the worker processes (directly from SimGrid) */
   }
 
   /* Get the info about the worker processes (directly from SimGrid) */
-  int workers_count   = MSG_get_host_number();
+  int worker_count    = MSG_get_host_number();
   msg_host_t* workers = xbt_dynar_to_array(MSG_hosts_as_dynar());
 
   msg_host_t* workers = xbt_dynar_to_array(MSG_hosts_as_dynar());
 
-  for (int i = 0; i < workers_count; i++)
+  for (int i = 0; i < worker_count; i++)
     if (host_self == workers[i]) {
     if (host_self == workers[i]) {
-      workers[i] = workers[workers_count - 1];
-      workers_count--;
+      workers[i] = workers[worker_count - 1];
+      worker_count--;
       break;
     }
 
       break;
     }
 
-  for (int i = 0; i < workers_count; i++)
+  for (int i = 0; i < worker_count; i++)
     MSG_process_create("worker", worker, (void*)master_name, workers[i]);
     MSG_process_create("worker", worker, (void*)master_name, workers[i]);
-  XBT_INFO("Got %d workers and %ld tasks to process", workers_count, number_of_tasks);
+  XBT_INFO("Got %d workers and %ld tasks to process", worker_count, number_of_tasks);
 
   /* Dispatch the tasks */
   for (int i = 0; i < number_of_tasks; i++) {
 
   /* Dispatch the tasks */
   for (int i = 0; i < number_of_tasks; i++) {
-    build_channel_name(channel, master_name, MSG_host_get_name(workers[i % workers_count]));
+    build_channel_name(channel, master_name, MSG_host_get_name(workers[i % worker_count]));
 
     XBT_INFO("Sending '%s' to channel '%s'", todo[i]->name, channel);
 
 
     XBT_INFO("Sending '%s' to channel '%s'", todo[i]->name, channel);
 
@@ -68,9 +68,9 @@ static int master(int argc, char* argv[])
   }
 
   XBT_INFO("All tasks have been dispatched. Let's tell everybody the computation is over.");
   }
 
   XBT_INFO("All tasks have been dispatched. Let's tell everybody the computation is over.");
-  for (int i = 0; i < workers_count; i++) {
+  for (int i = 0; i < worker_count; i++) {
     msg_task_t finalize = MSG_task_create("finalize", 0, 0, FINALIZE);
     msg_task_t finalize = MSG_task_create("finalize", 0, 0, FINALIZE);
-    MSG_task_send(finalize, build_channel_name(channel, master_name, MSG_host_get_name(workers[i % workers_count])));
+    MSG_task_send(finalize, build_channel_name(channel, master_name, MSG_host_get_name(workers[i % worker_count])));
   }
 
   XBT_INFO("Goodbye now!");
   }
 
   XBT_INFO("Goodbye now!");
index 2b71a0b..16d44b0 100644 (file)
@@ -34,19 +34,19 @@ static int master(int argc, char* argv[])
   double comm_size = xbt_str_parse_double(argv[3], "Invalid communication size: %s"); /** - Task communication size */
 
   /* Get the info about the worker processes (directly from SimGrid) */
   double comm_size = xbt_str_parse_double(argv[3], "Invalid communication size: %s"); /** - Task communication size */
 
   /* Get the info about the worker processes (directly from SimGrid) */
-  int workers_count   = MSG_get_host_number();
+  int worker_count    = MSG_get_host_number();
   msg_host_t* workers = xbt_dynar_to_array(MSG_hosts_as_dynar());
 
   msg_host_t* workers = xbt_dynar_to_array(MSG_hosts_as_dynar());
 
-  for (int i = 0; i < workers_count; i++) // Remove my host from the list
+  for (int i = 0; i < worker_count; i++) // Remove my host from the list
     if (host_self == workers[i]) {
     if (host_self == workers[i]) {
-      workers[i] = workers[workers_count - 1];
-      workers_count--;
+      workers[i] = workers[worker_count - 1];
+      worker_count--;
       break;
     }
 
       break;
     }
 
-  for (int i = 0; i < workers_count; i++)
+  for (int i = 0; i < worker_count; i++)
     MSG_process_create("worker", worker, (void*)master_name, workers[i]);
     MSG_process_create("worker", worker, (void*)master_name, workers[i]);
-  XBT_INFO("Got %d workers and will send tasks for %g seconds", workers_count, timeout);
+  XBT_INFO("Got %d workers and will send tasks for %g seconds", worker_count, timeout);
 
   /* Dispatch the tasks */
   int task_num = 0;
 
   /* Dispatch the tasks */
   int task_num = 0;
@@ -58,7 +58,7 @@ static int master(int argc, char* argv[])
     sprintf(sprintf_buffer, "Task_%d", task_num);
     msg_task_t task = MSG_task_create(sprintf_buffer, comp_size, comm_size, NULL);
 
     sprintf(sprintf_buffer, "Task_%d", task_num);
     msg_task_t task = MSG_task_create(sprintf_buffer, comp_size, comm_size, NULL);
 
-    build_channel_name(channel, master_name, MSG_host_get_name(workers[task_num % workers_count]));
+    build_channel_name(channel, master_name, MSG_host_get_name(workers[task_num % worker_count]));
 
     XBT_DEBUG("Sending '%s' to channel '%s'", task->name, channel);
     MSG_task_send(task, channel);
 
     XBT_DEBUG("Sending '%s' to channel '%s'", task->name, channel);
     MSG_task_send(task, channel);
@@ -67,9 +67,9 @@ static int master(int argc, char* argv[])
   }
 
   XBT_DEBUG("All tasks have been dispatched. Let's tell everybody the computation is over.");
   }
 
   XBT_DEBUG("All tasks have been dispatched. Let's tell everybody the computation is over.");
-  for (int i = 0; i < workers_count; i++) {
+  for (int i = 0; i < worker_count; i++) {
     msg_task_t finalize = MSG_task_create("finalize", 0, 0, FINALIZE);
     msg_task_t finalize = MSG_task_create("finalize", 0, 0, FINALIZE);
-    MSG_task_send(finalize, build_channel_name(channel, master_name, MSG_host_get_name(workers[i % workers_count])));
+    MSG_task_send(finalize, build_channel_name(channel, master_name, MSG_host_get_name(workers[i % worker_count])));
   }
 
   XBT_DEBUG("Sent %d tasks in total!", task_num);
   }
 
   XBT_DEBUG("Sent %d tasks in total!", task_num);
index 8cb7f19..2c187ec 100644 (file)
@@ -36,19 +36,19 @@ static int master(int argc, char* argv[])
   double comm_size = xbt_str_parse_double(argv[3], "Invalid communication size: %s"); /** - Task communication size */
 
   /* Get the info about the worker processes */
   double comm_size = xbt_str_parse_double(argv[3], "Invalid communication size: %s"); /** - Task communication size */
 
   /* Get the info about the worker processes */
-  int workers_count   = MSG_get_host_number();
+  int worker_count    = MSG_get_host_number();
   msg_host_t* workers = xbt_dynar_to_array(MSG_hosts_as_dynar());
 
   msg_host_t* workers = xbt_dynar_to_array(MSG_hosts_as_dynar());
 
-  for (int i = 0; i < workers_count; i++) // Remove my host from the list
+  for (int i = 0; i < worker_count; i++) // Remove my host from the list
     if (host_self == workers[i]) {
     if (host_self == workers[i]) {
-      workers[i] = workers[workers_count - 1];
-      workers_count--;
+      workers[i] = workers[worker_count - 1];
+      worker_count--;
       break;
     }
 
       break;
     }
 
-  for (int i = 0; i < workers_count; i++)
+  for (int i = 0; i < worker_count; i++)
     MSG_process_create("worker", worker, (void*)master_name, workers[i]);
     MSG_process_create("worker", worker, (void*)master_name, workers[i]);
-  XBT_INFO("Got %d workers and will send tasks for %g seconds", workers_count, timeout);
+  XBT_INFO("Got %d workers and will send tasks for %g seconds", worker_count, timeout);
 
   /* Dispatch the tasks */
   int task_num = 0;
 
   /* Dispatch the tasks */
   int task_num = 0;
@@ -62,7 +62,7 @@ static int master(int argc, char* argv[])
     msg_task_t task = MSG_task_create(sprintf_buffer, comp_size, comm_size, NULL);
     MSG_task_set_category(task, master_name);
 
     msg_task_t task = MSG_task_create(sprintf_buffer, comp_size, comm_size, NULL);
     MSG_task_set_category(task, master_name);
 
-    build_channel_name(channel, master_name, MSG_host_get_name(workers[task_num % workers_count]));
+    build_channel_name(channel, master_name, MSG_host_get_name(workers[task_num % worker_count]));
 
     XBT_DEBUG("Sending '%s' to channel '%s'", task->name, channel);
     MSG_task_send(task, channel);
 
     XBT_DEBUG("Sending '%s' to channel '%s'", task->name, channel);
     MSG_task_send(task, channel);
@@ -71,9 +71,9 @@ static int master(int argc, char* argv[])
   }
 
   XBT_DEBUG("All tasks have been dispatched. Let's tell everybody the computation is over.");
   }
 
   XBT_DEBUG("All tasks have been dispatched. Let's tell everybody the computation is over.");
-  for (int i = 0; i < workers_count; i++) {
+  for (int i = 0; i < worker_count; i++) {
     msg_task_t finalize = MSG_task_create("finalize", 0, 0, FINALIZE);
     msg_task_t finalize = MSG_task_create("finalize", 0, 0, FINALIZE);
-    MSG_task_send(finalize, build_channel_name(channel, master_name, MSG_host_get_name(workers[i % workers_count])));
+    MSG_task_send(finalize, build_channel_name(channel, master_name, MSG_host_get_name(workers[i % worker_count])));
   }
 
   XBT_INFO("Sent %d tasks in total!", task_num);
   }
 
   XBT_INFO("Sent %d tasks in total!", task_num);
index 890cdc4..6235ed6 100644 (file)
@@ -36,19 +36,19 @@ static int master(int argc, char* argv[])
   double comm_size = xbt_str_parse_double(argv[3], "Invalid communication size: %s"); /** - Task communication size */
 
   /* Get the info about the worker processes */
   double comm_size = xbt_str_parse_double(argv[3], "Invalid communication size: %s"); /** - Task communication size */
 
   /* Get the info about the worker processes */
-  int workers_count   = MSG_get_host_number();
+  int worker_count    = MSG_get_host_number();
   msg_host_t* workers = xbt_dynar_to_array(MSG_hosts_as_dynar());
 
   msg_host_t* workers = xbt_dynar_to_array(MSG_hosts_as_dynar());
 
-  for (int i = 0; i < workers_count; i++) // Remove my host from the list
+  for (int i = 0; i < worker_count; i++) // Remove my host from the list
     if (host_self == workers[i]) {
     if (host_self == workers[i]) {
-      workers[i] = workers[workers_count - 1];
-      workers_count--;
+      workers[i] = workers[worker_count - 1];
+      worker_count--;
       break;
     }
 
       break;
     }
 
-  for (int i = 0; i < workers_count; i++)
+  for (int i = 0; i < worker_count; i++)
     MSG_process_create("worker", worker, (void*)master_name, workers[i]);
     MSG_process_create("worker", worker, (void*)master_name, workers[i]);
-  XBT_INFO("Got %d workers and will send tasks for %g seconds", workers_count, timeout);
+  XBT_INFO("Got %d workers and will send tasks for %g seconds", worker_count, timeout);
 
   /* Dispatch the tasks */
   int task_num = 0;
 
   /* Dispatch the tasks */
   int task_num = 0;
@@ -78,7 +78,7 @@ static int master(int argc, char* argv[])
   }
 
   XBT_DEBUG("Time is up. Let's tell everybody the computation is over.");
   }
 
   XBT_DEBUG("Time is up. Let's tell everybody the computation is over.");
-  for (int i = 0; i < workers_count; i++) { /* We don't write in order, but the total amount is right */
+  for (int i = 0; i < worker_count; i++) { /* We don't write in order, but the total amount is right */
 
     /* Don't write to a worker that did not request for work, or it will deadlock: both would be sending something */
     msg_task_t request = NULL;
 
     /* Don't write to a worker that did not request for work, or it will deadlock: both would be sending something */
     msg_task_t request = NULL;
index 4ff16b0..2a2b906 100644 (file)
@@ -28,28 +28,28 @@ static int master(int argc, char* argv[])
   }
 
   /* Get the info about the worker processes from my parameters */
   }
 
   /* Get the info about the worker processes from my parameters */
-  int workers_count   = argc - 4;
-  msg_host_t* workers = xbt_new0(msg_host_t, workers_count);
+  int worker_count    = argc - 4;
+  msg_host_t* workers = xbt_new0(msg_host_t, worker_count);
 
   for (int i = 4; i < argc; i++) {
     workers[i - 4] = MSG_get_host_by_name(argv[i]);
     xbt_assert(workers[i - 4] != NULL, "Unknown host %s. Stopping Now! ", argv[i]);
   }
 
   for (int i = 4; i < argc; i++) {
     workers[i - 4] = MSG_get_host_by_name(argv[i]);
     xbt_assert(workers[i - 4] != NULL, "Unknown host %s. Stopping Now! ", argv[i]);
   }
-  XBT_INFO("Got %d workers and %ld tasks to process", workers_count, number_of_tasks);
+  XBT_INFO("Got %d workers and %ld tasks to process", worker_count, number_of_tasks);
 
   /* Dispatch the tasks */
   for (int i = 0; i < number_of_tasks; i++) {
 
   /* Dispatch the tasks */
   for (int i = 0; i < number_of_tasks; i++) {
-    XBT_INFO("Sending '%s' to '%s'", todo[i]->name, MSG_host_get_name(workers[i % workers_count]));
-    if (MSG_host_self() == workers[i % workers_count]) {
+    XBT_INFO("Sending '%s' to '%s'", todo[i]->name, MSG_host_get_name(workers[i % worker_count]));
+    if (MSG_host_self() == workers[i % worker_count]) {
       XBT_INFO("Hey ! It's me ! :)");
     }
 
       XBT_INFO("Hey ! It's me ! :)");
     }
 
-    MSG_task_send(todo[i], MSG_host_get_name(workers[i % workers_count]));
+    MSG_task_send(todo[i], MSG_host_get_name(workers[i % worker_count]));
     XBT_INFO("Sent");
   }
 
   XBT_INFO("All tasks have been dispatched. Let's tell everybody the computation is over.");
     XBT_INFO("Sent");
   }
 
   XBT_INFO("All tasks have been dispatched. Let's tell everybody the computation is over.");
-  for (int i = 0; i < workers_count; i++) {
+  for (int i = 0; i < worker_count; i++) {
     msg_task_t finalize = MSG_task_create("finalize", 0, 0, FINALIZE);
     MSG_task_send(finalize, MSG_host_get_name(workers[i]));
   }
     msg_task_t finalize = MSG_task_create("finalize", 0, 0, FINALIZE);
     MSG_task_send(finalize, MSG_host_get_name(workers[i]));
   }
index f345566..e70d67e 100644 (file)
@@ -133,7 +133,7 @@ bool Host::is_on()
 
 int Host::get_pstate_count() const
 {
 
 int Host::get_pstate_count() const
 {
-  return this->pimpl_cpu->get_pstates_count();
+  return this->pimpl_cpu->get_pstate_count();
 }
 
 /**
 }
 
 /**
@@ -246,7 +246,7 @@ double Host::get_available_speed()
 /** @brief Returns the number of core of the processor. */
 int Host::get_core_count()
 {
 /** @brief Returns the number of core of the processor. */
 int Host::get_core_count()
 {
-  return this->pimpl_cpu->get_cores_count();
+  return this->pimpl_cpu->get_core_count();
 }
 
 /** @brief Set the pstate at which the host should run */
 }
 
 /** @brief Set the pstate at which the host should run */
index 92d582d..1cf6f1b 100644 (file)
@@ -104,7 +104,7 @@ void CpuCas01::on_speed_change()
   const kernel::lmm::Element* elem = nullptr;
 
   get_model()->get_maxmin_system()->update_constraint_bound(get_constraint(),
   const kernel::lmm::Element* elem = nullptr;
 
   get_model()->get_maxmin_system()->update_constraint_bound(get_constraint(),
-                                                            get_cores_count() * speed_.scale * speed_.peak);
+                                                            get_core_count() * speed_.scale * speed_.peak);
   while ((var = get_constraint()->get_variable(&elem))) {
     CpuCas01Action* action = static_cast<CpuCas01Action*>(var->get_id());
 
   while ((var = get_constraint()->get_variable(&elem))) {
     CpuCas01Action* action = static_cast<CpuCas01Action*>(var->get_id());
 
@@ -119,7 +119,7 @@ void CpuCas01::apply_event(tmgr_trace_event_t event, double value)
 {
   if (event == speed_.event) {
     /* TODO (Hypervisor): do the same thing for constraint_core[i] */
 {
   if (event == speed_.event) {
     /* TODO (Hypervisor): do the same thing for constraint_core[i] */
-    xbt_assert(get_cores_count() == 1, "FIXME: add speed scaling code also for constraint_core[i]");
+    xbt_assert(get_core_count() == 1, "FIXME: add speed scaling code also for constraint_core[i]");
 
     speed_.scale = value;
     on_speed_change();
 
     speed_.scale = value;
     on_speed_change();
@@ -127,7 +127,7 @@ void CpuCas01::apply_event(tmgr_trace_event_t event, double value)
     tmgr_trace_event_unref(&speed_.event);
   } else if (event == state_event_) {
     /* TODO (Hypervisor): do the same thing for constraint_core[i] */
     tmgr_trace_event_unref(&speed_.event);
   } else if (event == state_event_) {
     /* TODO (Hypervisor): do the same thing for constraint_core[i] */
-    xbt_assert(get_cores_count() == 1, "FIXME: add state change code also for constraint_core[i]");
+    xbt_assert(get_core_count() == 1, "FIXME: add state change code also for constraint_core[i]");
 
     if (value > 0) {
       if (is_off())
 
     if (value > 0) {
       if (is_off())
index 245c019..eba8890 100644 (file)
@@ -60,7 +60,7 @@ Cpu::Cpu(kernel::resource::Model* model, simgrid::s4u::Host* host, std::vector<d
 
 Cpu::Cpu(kernel::resource::Model* model, simgrid::s4u::Host* host, kernel::lmm::Constraint* constraint,
          std::vector<double>* speedPerPstate, int core)
 
 Cpu::Cpu(kernel::resource::Model* model, simgrid::s4u::Host* host, kernel::lmm::Constraint* constraint,
          std::vector<double>* speedPerPstate, int core)
-    : Resource(model, host->get_cname(), constraint), cores_count_(core), host_(host)
+    : Resource(model, host->get_cname(), constraint), core_count_(core), host_(host)
 {
   xbt_assert(core > 0, "Host %s must have at least one core, not 0.", host->get_cname());
 
 {
   xbt_assert(core > 0, "Host %s must have at least one core, not 0.", host->get_cname());
 
@@ -81,7 +81,7 @@ Cpu::~Cpu()
     speed_per_pstate_.clear();
 }
 
     speed_per_pstate_.clear();
 }
 
-int Cpu::get_pstates_count()
+int Cpu::get_pstate_count()
 {
   return speed_per_pstate_.size();
 }
 {
   return speed_per_pstate_.size();
 }
@@ -129,9 +129,9 @@ void Cpu::on_speed_change()
   s4u::Host::on_speed_change(*host_);
 }
 
   s4u::Host::on_speed_change(*host_);
 }
 
-int Cpu::get_cores_count()
+int Cpu::get_core_count()
 {
 {
-  return cores_count_;
+  return core_count_;
 }
 
 void Cpu::set_state_trace(tmgr_trace_t trace)
 }
 
 void Cpu::set_state_trace(tmgr_trace_t trace)
index 2b0b3ec..fed276a 100644 (file)
@@ -103,7 +103,7 @@ public:
   virtual simgrid::kernel::resource::Action* sleep(double duration) = 0;
 
   /** @brief Get the amount of cores */
   virtual simgrid::kernel::resource::Action* sleep(double duration) = 0;
 
   /** @brief Get the amount of cores */
-  virtual int get_cores_count();
+  virtual int get_core_count();
 
   /** @brief Get a forecast of the speed (in flops/s) if the load were as provided.
    *
 
   /** @brief Get a forecast of the speed (in flops/s) if the load were as provided.
    *
@@ -130,14 +130,14 @@ public:
   /** @brief Get the peak processor speed (in flops/s), at the specified pstate */
   virtual double get_pstate_peak_speed(int pstate_index);
 
   /** @brief Get the peak processor speed (in flops/s), at the specified pstate */
   virtual double get_pstate_peak_speed(int pstate_index);
 
-  virtual int get_pstates_count();
+  virtual int get_pstate_count();
   virtual void set_pstate(int pstate_index);
   virtual int get_pstate();
 
   simgrid::s4u::Host* get_host() { return host_; }
 
 private:
   virtual void set_pstate(int pstate_index);
   virtual int get_pstate();
 
   simgrid::s4u::Host* get_host() { return host_; }
 
 private:
-  int cores_count_ = 1;
+  int core_count_ = 1;
   simgrid::s4u::Host* host_;
 
   int pstate_ = 0;                       /*< Current pstate (index in the speed_per_pstate_)*/
   simgrid::s4u::Host* host_;
 
   int pstate_ = 0;                       /*< Current pstate (index in the speed_per_pstate_)*/
index dcd67a3..f0e7c9b 100644 (file)
@@ -235,7 +235,7 @@ double HostEnergy::getCurrentWattsValue()
     cpu_load = host->pimpl_cpu->get_constraint()->get_usage() / current_speed;
 
   /** Divide by the number of cores here **/
     cpu_load = host->pimpl_cpu->get_constraint()->get_usage() / current_speed;
 
   /** Divide by the number of cores here **/
-  cpu_load /= host->pimpl_cpu->get_cores_count();
+  cpu_load /= host->pimpl_cpu->get_core_count();
 
   if (cpu_load > 1) // A machine with a load > 1 consumes as much as a fully loaded machine, not more
     cpu_load = 1;
 
   if (cpu_load > 1) // A machine with a load > 1 consumes as much as a fully loaded machine, not more
     cpu_load = 1;
index 39fdfb4..8075c58 100644 (file)
@@ -19,38 +19,38 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example")
 static int runner(int argc, char* argv[])
 {
   /* Retrieve the list of all hosts as an array of hosts */
 static int runner(int argc, char* argv[])
 {
   /* Retrieve the list of all hosts as an array of hosts */
-  int hosts_count   = MSG_get_host_number();
+  int host_count    = MSG_get_host_number();
   msg_host_t* hosts = xbt_dynar_to_array(MSG_hosts_as_dynar());
 
   XBT_INFO("First, build a classical parallel task, with 1 Gflop to execute on each node, "
            "and 10MB to exchange between each pair");
   msg_host_t* hosts = xbt_dynar_to_array(MSG_hosts_as_dynar());
 
   XBT_INFO("First, build a classical parallel task, with 1 Gflop to execute on each node, "
            "and 10MB to exchange between each pair");
-  double* computation_amounts   = xbt_new0(double, hosts_count);
-  double* communication_amounts = xbt_new0(double, hosts_count* hosts_count);
+  double* computation_amounts   = xbt_new0(double, host_count);
+  double* communication_amounts = xbt_new0(double, host_count* host_count);
 
 
-  for (int i               = 0; i < hosts_count; i++)
+  for (int i = 0; i < host_count; i++)
     computation_amounts[i] = 1e9; // 1 Gflop
 
     computation_amounts[i] = 1e9; // 1 Gflop
 
-  for (int i = 0; i < hosts_count; i++)
-    for (int j                                   = i + 1; j < hosts_count; j++)
-      communication_amounts[i * hosts_count + j] = 1e7; // 10 MB
+  for (int i = 0; i < host_count; i++)
+    for (int j = i + 1; j < host_count; j++)
+      communication_amounts[i * host_count + j] = 1e7; // 10 MB
 
   msg_task_t ptask =
 
   msg_task_t ptask =
-      MSG_parallel_task_create("parallel task", hosts_count, hosts, computation_amounts, communication_amounts, NULL);
+      MSG_parallel_task_create("parallel task", host_count, hosts, computation_amounts, communication_amounts, NULL);
   MSG_parallel_task_execute(ptask);
   MSG_task_destroy(ptask);
   xbt_free(communication_amounts);
   xbt_free(computation_amounts);
 
   XBT_INFO("We can do the same with a timeout of one second enabled.");
   MSG_parallel_task_execute(ptask);
   MSG_task_destroy(ptask);
   xbt_free(communication_amounts);
   xbt_free(computation_amounts);
 
   XBT_INFO("We can do the same with a timeout of one second enabled.");
-  computation_amounts   = xbt_new0(double, hosts_count);
-  communication_amounts = xbt_new0(double, hosts_count* hosts_count);
-  for (int i               = 0; i < hosts_count; i++)
+  computation_amounts   = xbt_new0(double, host_count);
+  communication_amounts = xbt_new0(double, host_count* host_count);
+  for (int i = 0; i < host_count; i++)
     computation_amounts[i] = 1e9; // 1 Gflop
     computation_amounts[i] = 1e9; // 1 Gflop
-  for (int i = 0; i < hosts_count; i++)
-    for (int j                                   = i + 1; j < hosts_count; j++)
-      communication_amounts[i * hosts_count + j] = 1e7; // 10 MB
+  for (int i = 0; i < host_count; i++)
+    for (int j = i + 1; j < host_count; j++)
+      communication_amounts[i * host_count + j] = 1e7; // 10 MB
   ptask =
   ptask =
-      MSG_parallel_task_create("parallel task", hosts_count, hosts, computation_amounts, communication_amounts, NULL);
+      MSG_parallel_task_create("parallel task", host_count, hosts, computation_amounts, communication_amounts, NULL);
   msg_error_t errcode = MSG_parallel_task_execute_with_timeout(ptask, 1 /* timeout (in seconds)*/);
   xbt_assert(errcode == MSG_TIMEOUT, "Woops, this did not timeout as expected... Please report that bug.");
   MSG_task_destroy(ptask);
   msg_error_t errcode = MSG_parallel_task_execute_with_timeout(ptask, 1 /* timeout (in seconds)*/);
   xbt_assert(errcode == MSG_TIMEOUT, "Woops, this did not timeout as expected... Please report that bug.");
   MSG_task_destroy(ptask);
@@ -58,19 +58,19 @@ static int runner(int argc, char* argv[])
   xbt_free(computation_amounts);
 
   XBT_INFO("Then, build a parallel task involving only computations and no communication (1 Gflop per node)");
   xbt_free(computation_amounts);
 
   XBT_INFO("Then, build a parallel task involving only computations and no communication (1 Gflop per node)");
-  computation_amounts = xbt_new0(double, hosts_count);
-  for (int i               = 0; i < hosts_count; i++)
+  computation_amounts = xbt_new0(double, host_count);
+  for (int i = 0; i < host_count; i++)
     computation_amounts[i] = 1e9; // 1 Gflop
     computation_amounts[i] = 1e9; // 1 Gflop
-  ptask = MSG_parallel_task_create("parallel exec", hosts_count, hosts, computation_amounts, NULL /* no comm */, NULL);
+  ptask = MSG_parallel_task_create("parallel exec", host_count, hosts, computation_amounts, NULL /* no comm */, NULL);
   MSG_parallel_task_execute(ptask);
   MSG_task_destroy(ptask);
   xbt_free(computation_amounts);
 
   XBT_INFO("Then, build a parallel task with no computation nor communication (synchro only)");
   MSG_parallel_task_execute(ptask);
   MSG_task_destroy(ptask);
   xbt_free(computation_amounts);
 
   XBT_INFO("Then, build a parallel task with no computation nor communication (synchro only)");
-  computation_amounts   = xbt_new0(double, hosts_count);
-  communication_amounts = xbt_new0(double, hosts_count* hosts_count); /* memset to 0 by xbt_new0 */
+  computation_amounts   = xbt_new0(double, host_count);
+  communication_amounts = xbt_new0(double, host_count* host_count); /* memset to 0 by xbt_new0 */
   ptask =
   ptask =
-      MSG_parallel_task_create("parallel sync", hosts_count, hosts, computation_amounts, communication_amounts, NULL);
+      MSG_parallel_task_create("parallel sync", host_count, hosts, computation_amounts, communication_amounts, NULL);
   MSG_parallel_task_execute(ptask);
   MSG_task_destroy(ptask);
   xbt_free(communication_amounts);
   MSG_parallel_task_execute(ptask);
   MSG_task_destroy(ptask);
   xbt_free(communication_amounts);