|
@@ -16,10 +16,11 @@ static struct _starpu_task_execute_preds estimated_execute_preds(struct _starpu_
|
|
|
struct _starpu_task_execute_preds preds = node->childs[0]->estimated_execute_preds(node->childs[0],task);
|
|
struct _starpu_task_execute_preds preds = node->childs[0]->estimated_execute_preds(node->childs[0],task);
|
|
|
|
|
|
|
|
struct _starpu_fifo_taskq * fifo = node->data;
|
|
struct _starpu_fifo_taskq * fifo = node->data;
|
|
|
|
|
+// printf("%p %f %f %f\n",fifo ,fifo->exp_start,fifo->exp_len,fifo->exp_end);
|
|
|
|
|
|
|
|
STARPU_PTHREAD_RWLOCK_RDLOCK(&node->mutex);
|
|
STARPU_PTHREAD_RWLOCK_RDLOCK(&node->mutex);
|
|
|
if(preds.state == PERF_MODEL)
|
|
if(preds.state == PERF_MODEL)
|
|
|
- preds.expected_finish_time = _starpu_compute_expected_time(starpu_timing_now(),
|
|
|
|
|
|
|
+ preds.expected_finish_time = _starpu_compute_expected_time(fifo->exp_start = starpu_timing_now(),
|
|
|
preds.expected_finish_time + fifo->exp_end,
|
|
preds.expected_finish_time + fifo->exp_end,
|
|
|
preds.expected_length + fifo->exp_len,
|
|
preds.expected_length + fifo->exp_len,
|
|
|
preds.expected_transfer_length);
|
|
preds.expected_transfer_length);
|
|
@@ -51,8 +52,11 @@ static int push_task(struct _starpu_sched_node * node, struct starpu_task * task
|
|
|
STARPU_PTHREAD_RWLOCK_WRLOCK(&node->mutex);
|
|
STARPU_PTHREAD_RWLOCK_WRLOCK(&node->mutex);
|
|
|
struct _starpu_fifo_taskq * fifo = node->data;
|
|
struct _starpu_fifo_taskq * fifo = node->data;
|
|
|
int ret = _starpu_fifo_push_sorted_task(fifo, task);
|
|
int ret = _starpu_fifo_push_sorted_task(fifo, task);
|
|
|
- fifo->exp_end += task->predicted/node->nworkers;
|
|
|
|
|
- fifo->exp_len += task->predicted/node->nworkers;
|
|
|
|
|
|
|
+ if(!isnan(task->predicted))
|
|
|
|
|
+ {
|
|
|
|
|
+ fifo->exp_len += task->predicted/node->nworkers;
|
|
|
|
|
+ fifo->exp_end = fifo->exp_start + fifo->exp_end;
|
|
|
|
|
+ }
|
|
|
STARPU_PTHREAD_RWLOCK_UNLOCK(&node->mutex);
|
|
STARPU_PTHREAD_RWLOCK_UNLOCK(&node->mutex);
|
|
|
node->available(node);
|
|
node->available(node);
|
|
|
return ret;
|
|
return ret;
|
|
@@ -68,6 +72,7 @@ static struct starpu_task * pop_task(struct _starpu_sched_node * node, unsigned
|
|
|
fifo->exp_start = starpu_timing_now() + task->predicted;
|
|
fifo->exp_start = starpu_timing_now() + task->predicted;
|
|
|
if(!isnan(task->predicted))
|
|
if(!isnan(task->predicted))
|
|
|
fifo->exp_len -= task->predicted/node->nworkers;
|
|
fifo->exp_len -= task->predicted/node->nworkers;
|
|
|
|
|
+ fifo->exp_end = fifo->exp_start + fifo->exp_end;
|
|
|
}
|
|
}
|
|
|
STARPU_PTHREAD_RWLOCK_UNLOCK(&node->mutex);
|
|
STARPU_PTHREAD_RWLOCK_UNLOCK(&node->mutex);
|
|
|
if(task)
|
|
if(task)
|