Browse Source

Fix dmda notification prediction summation: the transfer happens before the computation

Samuel Thibault 12 years ago
parent
commit
d92f78112f
1 changed files with 8 additions and 8 deletions
  1. 8 8
      src/sched_policies/deque_modeling_policy_data_aware.c

+ 8 - 8
src/sched_policies/deque_modeling_policy_data_aware.c

@@ -983,14 +983,6 @@ static void dmda_push_task_notify(struct starpu_task *task, int workerid, unsign
 	fifo->exp_end = fifo->exp_start + fifo->exp_len;
 
 	/* If there is no prediction available, we consider the task has a null length */
-	if (!isnan(predicted))
-	{
-		task->predicted = predicted;
-		fifo->exp_end += predicted;
-		fifo->exp_len += predicted;
-	}
-
-	/* If there is no prediction available, we consider the task has a null length */
 	if (!isnan(predicted_transfer))
 	{
 		if (starpu_timing_now() + predicted_transfer < fifo->exp_end)
@@ -1010,6 +1002,14 @@ static void dmda_push_task_notify(struct starpu_task *task, int workerid, unsign
 		fifo->exp_len += predicted_transfer;
 	}
 
+	/* If there is no prediction available, we consider the task has a null length */
+	if (!isnan(predicted))
+	{
+		task->predicted = predicted;
+		fifo->exp_end += predicted;
+		fifo->exp_len += predicted;
+	}
+
 	fifo->ntasks++;
 
 	_STARPU_PTHREAD_MUTEX_UNLOCK(sched_mutex);