瀏覽代碼

starpu_task: define a optional name. This can be useful for debugging purposes.

Nathalie Furmento 11 年之前
父節點
當前提交
876ff6d9a2
共有 4 個文件被更改,包括 13 次插入4 次删除
  1. 5 3
      ChangeLog
  2. 3 0
      doc/doxygen/chapters/api/codelet_and_tasks.doxy
  3. 4 1
      include/starpu_task.h
  4. 1 0
      src/core/task.c

+ 5 - 3
ChangeLog

@@ -76,12 +76,14 @@ Small features:
     renamed in starpu_task_insert and starpu_mpi_task_insert. Old
     names are kept to avoid breaking old codes.
   * New configure option --enable-calibration-heuristic which allows
-    the user to set the maximum authorized deviation of the 
-    history-based calibrator. 
+    the user to set the maximum authorized deviation of the
+    history-based calibrator.
+  * Tasks can now have a name (via the field const char *name of
+    struct starpu_task)
 
 Changes:
   * Fix of the livelock issue discovered while executing applications
-    on a CPU+GPU cluster of machines by adding a maximum trylock 
+    on a CPU+GPU cluster of machines by adding a maximum trylock
     threshold before a blocking lock.
   * Data interfaces (variable, vector, matrix and block) now define
     pack und unpack functions

+ 3 - 0
doc/doxygen/chapters/api/codelet_and_tasks.doxy

@@ -331,6 +331,9 @@ starpu_task_create(), or declared statically. In the latter case, the
 programmer has to zero the structure starpu_task and to fill the
 different fields properly. The indicated default values correspond to
 the configuration of a task allocated with starpu_task_create().
+\var starpu_task::name
+Optional name of the task. This can be useful for debugging
+purposes.
 \var starpu_task::cl
 Is a pointer to the corresponding structure starpu_codelet. This
 describes where the kernel should be executed, and supplies the

+ 4 - 1
include/starpu_task.h

@@ -164,6 +164,8 @@ struct starpu_task
 	void *starpu_private;
 	int magic;
 
+	const char *name;
+
 	unsigned sched_ctx;
 	int hypervisor_tag;
 	double flops;
@@ -197,7 +199,8 @@ struct starpu_task
 	.flops = 0.0,					\
 	.scheduled = 0,					\
 	.dyn_handles = NULL,				\
-	.dyn_interfaces = NULL				\
+	.dyn_interfaces = NULL,				\
+	.name = NULL                        		\
 }
 
 #define STARPU_TASK_GET_HANDLE(task, i) ((task->dyn_handles) ? task->dyn_handles[i] : task->handles[i])

+ 1 - 0
src/core/task.c

@@ -83,6 +83,7 @@ void starpu_task_init(struct starpu_task *task)
 
 	task->dyn_handles = NULL;
 	task->dyn_interfaces = NULL;
+	task->name = NULL;
 }
 
 /* Free all the ressources allocated for a task, without deallocating the task