diff --git a/doc/doxygen/chapters/starpu_performances/offline_performance_tools.doxy b/doc/doxygen/chapters/starpu_performances/offline_performance_tools.doxy index 80cbb79eda..f2167e3e04 100644 --- a/doc/doxygen/chapters/starpu_performances/offline_performance_tools.doxy +++ b/doc/doxygen/chapters/starpu_performances/offline_performance_tools.doxy @@ -232,8 +232,8 @@ starpu_task_insert() \li Iteration: refers to the iteration number of the computation, as set by starpu_iteration_push() at the beginning of submission loops and starpu_iteration_pop() at the end of submission loops \li JobId: represents a unique identifier for the specific task, as returned by starpu_task_get_job_id() \li NumaNodes: refers to the NUMA node where the data is stored, the environment variable \ref STARPU_FXT_EVENTS needs to contain \c TASK_VERBOSE_EXTRA, otherwise it will be -1 -\li Params: represents parameters or input/output types and sizes, possibly indicating the dimensions of the matrices -\li Size: represents the size of the data being operated on in bytes +\li Params: represents parameters or input/output types and sizes, possibly indicating the dimensions of the matrices, depending on how the function starpu_data_interface_ops::describe of the datatype is implemented +\li Size: represents the size of the data being operated on in bytes, computed as the sum of the data sizes of each data handle manipulated by the task \li Subiteration: represents a sub-iteration number if the computation was part of a larger iteration or loop, as set by starpu_iteration_push() \li SubmitOrder: represents the order in which the task was submitted by the application @@ -400,6 +400,23 @@ It is possible to get a graphical output of the graph by using the $ dot -Tpdf dag.dot -o output.pdf \endverbatim + +or visualize it directly with a program like xdot: + +\verbatim +$ xdot dag.dot +\endverbatim + +In the task graph, the color of each node is computed as follows: +
    +
  1. If the codelet defined a color (see \ref starpu_codelet::color), this color is used;
  2. +
  3. If the option -c of starpu_fxt_tool was set, all tasks having the same name will have the same color;
  4. +
  5. Otherwise, the color will represent on which worker the task was executed (green for CPUs and yellow to red for accelerators.
  6. +
+ +Moreover, the option -no-acquire of starpu_fxt_tool hides StarPU internal tasks for data acquisition from the graph. On the contrary, the option -internal shows more internal tasks. + + \subsection TraceTaskDetails Getting Task Details Another generated trace file gives details on the executed tasks. The diff --git a/src/debug/traces/starpu_fxt.c b/src/debug/traces/starpu_fxt.c index 3affd22b85..e6495a27a0 100644 --- a/src/debug/traces/starpu_fxt.c +++ b/src/debug/traces/starpu_fxt.c @@ -3052,41 +3052,44 @@ static void handle_task_name(struct fxt_ev_64 *ev, struct starpu_fxt_options *op struct task_info *task = get_task(job_id, options->file_rank); int worker = find_worker_id(prefixTOnodeid(prefix), ev->param[1]); - const char *color; - char buffer[32]; - int code; - if (task->color != 0) - { - snprintf(buffer, sizeof(buffer), "#%06x", task->color); - color = &buffer[0]; - code = ((task->color & 0xff) + - ((task->color >> 8) & 0xff) + - ((task->color >> 16) & 0xff)) / 256; - } - else if (options->per_task_colour) - { - unsigned red = get_color_symbol_red(name)/4; - unsigned green = get_color_symbol_green(name)/4; - unsigned blue = get_color_symbol_blue(name)/4; - snprintf(buffer, sizeof(buffer), "#%s%x%s%x%s%x", - red < 16 ? "0" : "", red, - green < 16 ? "0" : "", green, - blue < 16 ? "0" : "", blue); - color = &buffer[0]; - code = (red + green + blue) / 256; - } - else - { - color= (worker < 0)?"#aaaaaa":get_worker_color(worker); - code = 0; - } - if (!task->name) task->name = strdup(name); - char *fontcolor = code <= 1 ? "white" : "black"; if (!task->exclude_from_dag && show_task(task, options)) + { + const char *color; + char buffer[32]; + int code; + if (task->color != 0) + { + snprintf(buffer, sizeof(buffer), "#%06x", task->color); + color = &buffer[0]; + code = ((task->color & 0xff) + + ((task->color >> 8) & 0xff) + + ((task->color >> 16) & 0xff)) / 256; + } + else if (options->per_task_colour) + { + unsigned red = get_color_symbol_red(name)/4; + unsigned green = get_color_symbol_green(name)/4; + unsigned blue = get_color_symbol_blue(name)/4; + snprintf(buffer, sizeof(buffer), "#%s%x%s%x%s%x", + red < 16 ? "0" : "", red, + green < 16 ? "0" : "", green, + blue < 16 ? "0" : "", blue); + color = &buffer[0]; + code = (red + green + blue) / 256; + } + else + { + color= (worker < 0)?"#aaaaaa":get_worker_color(worker); + code = 0; + } + + + char *fontcolor = code <= 1 ? "white" : "black"; _starpu_fxt_dag_set_task_name(options->file_prefix, job_id, task->name, color, fontcolor); + } } #ifdef STARPU_RECURSIVE_TASKS