Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use the rate variable... (thanks Fred for noticing it).
authoralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 12 Sep 2008 14:14:56 +0000 (14:14 +0000)
committeralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 12 Sep 2008 14:14:56 +0000 (14:14 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5928 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/surf/workstation_ptask_L07.c

index 2e5f270..989379e 100644 (file)
@@ -542,14 +542,10 @@ static surf_action_t execute_parallel_task(int workstation_nb,
   xbt_swag_insert(action, action->generic_action.state_set);
   action->rate = rate;
 
-  if (action->rate > 0)
-    action->variable =
-       lmm_variable_new(ptask_maxmin_system, action, 1.0, -1.0,
-                        workstation_nb + nb_link);
-  else
-    action->variable =
-       lmm_variable_new(ptask_maxmin_system, action, 1.0, action->rate,
-                        workstation_nb + nb_link);
+  action->variable =
+    lmm_variable_new(ptask_maxmin_system, action, 1.0, 
+                    (action->rate>0)?action->rate:-1.0,
+                    workstation_nb + nb_link);
 
   if (action->latency > 0) 
     lmm_update_variable_weight(ptask_maxmin_system,action->variable,0.0);