Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
priority and bound of MSG tasks can only be set BEFORE execution
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 25 Feb 2019 10:44:47 +0000 (11:44 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 25 Feb 2019 10:44:47 +0000 (11:44 +0100)
this is the rule for S4U, should be the same for MSG.
BTW, the behavior of the LMM is likely to be confused by such dynamic
changes during execution.

Side effect: we should remove the setters in ExecImpl, but there are
used by two simcalls that are tagged as deprected with v3.25

src/kernel/activity/ExecImpl.hpp
src/msg/msg_task.cpp

index cda277c..38cedad 100644 (file)
@@ -26,8 +26,8 @@ public:
   void finish() override;
   double get_remaining();
   double get_remaining_ratio();
-  void set_bound(double bound);
-  void set_priority(double priority);
+  void set_bound(double bound);       // deprecated. To be removed in v3.25
+  void set_priority(double priority); // deprecated. To be removed in v3.25
   virtual ActivityImpl* migrate(s4u::Host* to);
 
   /* The host where the execution takes place. nullptr means this is a parallel exec (and only surf knows the hosts) */
index 7101756..42ec522 100644 (file)
@@ -285,8 +285,6 @@ void MSG_task_set_priority(msg_task_t task, double priority)
 {
   task->simdata->priority = 1 / priority;
   xbt_assert(std::isfinite(task->simdata->priority), "priority is not finite!");
-  if (task->simdata->compute)
-    simgrid::simix::simcall([task] { task->simdata->compute->set_priority(task->simdata->priority); });
 }
 
 /** @brief Changes the maximum CPU utilization of a computation task (in flops/s).
@@ -297,8 +295,5 @@ void MSG_task_set_bound(msg_task_t task, double bound)
 {
   if (bound < 1e-12) /* close enough to 0 without any floating precision surprise */
     XBT_INFO("bound == 0 means no capping (i.e., unlimited).");
-
   task->simdata->bound = bound;
-  if (task->simdata->compute)
-    simgrid::simix::simcall([task, bound] { task->simdata->compute->set_bound(bound); });
 }