|
@@ -4,7 +4,7 @@
|
|
|
* Copyright (C) 2013 Joris Pablo
|
|
|
* Copyright (C) 2012-2018 CNRS
|
|
|
* Copyright (C) 2017 Universidade Federal do Rio Grande do Sul (UFRGS)
|
|
|
- * Copyright (C) 2009-2017 Université de Bordeaux
|
|
|
+ * Copyright (C) 2009-2018 Université de Bordeaux
|
|
|
*
|
|
|
* StarPU is free software; you can redistribute it and/or modify
|
|
|
* it under the terms of the GNU Lesser General Public License as published by
|
|
@@ -98,6 +98,8 @@ struct task_info
|
|
|
char *model_name;
|
|
|
char *name;
|
|
|
int exclude_from_dag;
|
|
|
+ int show;
|
|
|
+ unsigned type;
|
|
|
unsigned long job_id;
|
|
|
unsigned long submit_order;
|
|
|
long priority;
|
|
@@ -132,6 +134,8 @@ static struct task_info *get_task(unsigned long job_id, int mpi_rank)
|
|
|
task->model_name = NULL;
|
|
|
task->name = NULL;
|
|
|
task->exclude_from_dag = 0;
|
|
|
+ task->show = 0;
|
|
|
+ task->type = 0;
|
|
|
task->job_id = job_id;
|
|
|
task->submit_order = 0;
|
|
|
task->priority = 0;
|
|
@@ -159,6 +163,18 @@ static struct task_info *get_task(unsigned long job_id, int mpi_rank)
|
|
|
return task;
|
|
|
}
|
|
|
|
|
|
+/* Return whether to show this task in the DAG or not */
|
|
|
+static int show_task(struct task_info *task, struct starpu_fxt_options *options)
|
|
|
+{
|
|
|
+ if (task->show)
|
|
|
+ return 1;
|
|
|
+ if (task->type & STARPU_TASK_TYPE_INTERNAL && !options->internal)
|
|
|
+ return 0;
|
|
|
+ if (task->type & STARPU_TASK_TYPE_DATA_ACQUIRE && options->no_acquire)
|
|
|
+ return 0;
|
|
|
+ return 1;
|
|
|
+}
|
|
|
+
|
|
|
static void task_dump(struct task_info *task, struct starpu_fxt_options *options)
|
|
|
{
|
|
|
char *prefix = options->file_prefix;
|
|
@@ -2551,10 +2567,14 @@ static void handle_task_deps(struct fxt_ev_64 *ev, struct starpu_fxt_options *op
|
|
|
{
|
|
|
unsigned long dep_prev = ev->param[0];
|
|
|
unsigned long dep_succ = ev->param[1];
|
|
|
+ unsigned dep_succ_type = ev->param[2];
|
|
|
|
|
|
struct task_info *task = get_task(dep_succ, options->file_rank);
|
|
|
+ struct task_info *prev_task = get_task(dep_prev, options->file_rank);
|
|
|
unsigned alloc = 0;
|
|
|
|
|
|
+ task->type = dep_succ_type;
|
|
|
+
|
|
|
if (task->ndeps == 0)
|
|
|
/* Start with 8=2^3, should be plenty in most cases */
|
|
|
alloc = 8;
|
|
@@ -2574,7 +2594,11 @@ static void handle_task_deps(struct fxt_ev_64 *ev, struct starpu_fxt_options *op
|
|
|
task->dependencies[task->ndeps++] = dep_prev;
|
|
|
|
|
|
/* There is a dependency between both job id : dep_prev -> dep_succ */
|
|
|
- _starpu_fxt_dag_add_task_deps(options->file_prefix, dep_prev, dep_succ);
|
|
|
+ if (show_task(task, options)) {
|
|
|
+ /* We should show the name of the predecessor, then. */
|
|
|
+ prev_task->show = 1;
|
|
|
+ _starpu_fxt_dag_add_task_deps(options->file_prefix, dep_prev, dep_succ);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
static void handle_task_submit(struct fxt_ev_64 *ev, struct starpu_fxt_options *options)
|
|
@@ -2584,6 +2608,7 @@ static void handle_task_submit(struct fxt_ev_64 *ev, struct starpu_fxt_options *
|
|
|
unsigned long subiteration = ev->param[2];
|
|
|
unsigned long submit_order = ev->param[3];
|
|
|
long priority = (long) ev->param[4];
|
|
|
+ unsigned type = ev->param[5];
|
|
|
|
|
|
struct task_info *task = get_task(job_id, options->file_rank);
|
|
|
task->submit_time = get_event_time_stamp(ev, options);
|
|
@@ -2591,6 +2616,7 @@ static void handle_task_submit(struct fxt_ev_64 *ev, struct starpu_fxt_options *
|
|
|
task->priority = priority;
|
|
|
task->iterations[0] = iteration;
|
|
|
task->iterations[1] = subiteration;
|
|
|
+ task->type = type;
|
|
|
}
|
|
|
|
|
|
static void handle_task_name(struct fxt_ev_64 *ev, struct starpu_fxt_options *options)
|
|
@@ -2625,7 +2651,7 @@ 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);
|
|
|
task->exclude_from_dag = exclude_from_dag;
|
|
|
|
|
|
- if (!exclude_from_dag)
|
|
|
+ if (!exclude_from_dag && show_task(task, options))
|
|
|
_starpu_fxt_dag_set_task_name(options->file_prefix, job_id, name, colour);
|
|
|
}
|
|
|
|
|
@@ -3817,6 +3843,8 @@ void starpu_fxt_options_init(struct starpu_fxt_options *options)
|
|
|
options->no_bus = 0;
|
|
|
options->no_flops = 0;
|
|
|
options->no_smooth = 0;
|
|
|
+ options->no_acquire = 0;
|
|
|
+ options->internal = 0;
|
|
|
options->ninputfiles = 0;
|
|
|
options->out_paje_path = "paje.trace";
|
|
|
options->dag_path = "dag.dot";
|