瀏覽代碼

Do not hide synchronization tasks in DAGs, but keep them internal for the hypervisor

Samuel Thibault 12 年之前
父節點
當前提交
1041c694c5
共有 4 個文件被更改,包括 9 次插入5 次删除
  1. 1 1
      src/core/jobs.c
  2. 4 1
      src/core/jobs.h
  3. 1 1
      src/core/simgrid.c
  4. 3 2
      src/core/task.c

+ 1 - 1
src/core/jobs.c

@@ -222,7 +222,7 @@ void _starpu_handle_job_termination(struct _starpu_job *j)
 	 * scheduler to process it : the task structure doesn't contain any valuable
 	 * data as it's not linked to an actual worker */
 	/* control task should not execute post_exec_hook */
-	if(j->task_size == 1 && task->cl != NULL && !j->exclude_from_dag)
+	if(j->task_size == 1 && task->cl != NULL && !j->internal)
 	{
 		_starpu_sched_post_exec_hook(task);
 #ifdef STARPU_USE_SCHED_CTX_HYPERVISOR

+ 4 - 1
src/core/jobs.h

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2009-2012  Université de Bordeaux 1
+ * Copyright (C) 2009-2013  Université de Bordeaux 1
  * Copyright (C) 2010, 2011, 2013  Centre National de la Recherche Scientifique
  * Copyright (C) 2011  Télécom-SudParis
  *
@@ -103,6 +103,9 @@ LIST_TYPE(_starpu_job,
 	 * with dot) */
         unsigned exclude_from_dag;
 
+	/* Is that task internal to StarPU ? */
+	unsigned internal;
+
 	/* Each job is attributed a unique id. */
 	unsigned long job_id;
 

+ 1 - 1
src/core/simgrid.c

@@ -102,7 +102,7 @@ void _starpu_simgrid_execute_job(struct _starpu_job *j, enum starpu_perf_archtyp
 	struct starpu_task *task = j->task;
 	msg_task_t simgrid_task;
 
-	if (j->exclude_from_dag)
+	if (j->internal)
 		/* This is not useful to include in simulation (and probably
 		 * doesn't have a perfmodel anyway) */
 		return;

+ 3 - 2
src/core/task.c

@@ -365,7 +365,7 @@ int starpu_task_submit(struct starpu_task *task)
 	* allocated. */
 	struct _starpu_job *j = _starpu_get_job_associated_to_task(task);
 
-	if (task->sched_ctx == 0 && nsched_ctxs != 1 && !j->exclude_from_dag)
+	if (task->sched_ctx == 0 && nsched_ctxs != 1 && !j->internal)
 	{
 		set_sched_ctx = starpu_sched_ctx_get_context();
 		if (set_sched_ctx != STARPU_NMAX_SCHED_CTXS)
@@ -485,7 +485,8 @@ int starpu_task_submit(struct starpu_task *task)
 
 int _starpu_task_submit_internally(struct starpu_task *task)
 {
-	_starpu_exclude_task_from_dag(task);
+	struct _starpu_job *j = _starpu_get_job_associated_to_task(task);
+	j->internal = 1;
 	return starpu_task_submit(task);
 }