Sfoglia il codice sorgente

Perhaps there is no available prediction

Cédric Augonnet 14 anni fa
parent
commit
e52e8ad7b4
1 ha cambiato i file con 7 aggiunte e 2 eliminazioni
  1. 7 2
      src/sched_policies/heft.c

+ 7 - 2
src/sched_policies/heft.c

@@ -100,8 +100,13 @@ static void heft_push_task_notify(struct starpu_task *task, int workerid)
 	exp_start[workerid] = STARPU_MAX(exp_start[workerid], starpu_timing_now());
 	exp_end[workerid] = STARPU_MAX(exp_start[workerid], starpu_timing_now());
 
-	exp_end[workerid] += predicted;
-	exp_len[workerid] += predicted;
+	/* If there is no prediction available, we consider the task has a null length */
+	if (predicted != -1.0)
+	{
+		exp_end[workerid] += predicted;
+		exp_len[workerid] += predicted;
+	}
+
 	ntasks[workerid]++;
 
 	PTHREAD_MUTEX_UNLOCK(&sched_mutex[workerid]);