Accéder au contenu.
Menu Sympa

starpu-devel - Re: [Starpu-devel] activity.data : nsubmitted, nready

Objet : Developers list for StarPU

Archives de la liste

Re: [Starpu-devel] activity.data : nsubmitted, nready


Chronologique Discussions 
  • From: Jean-Marie Couteyen <jean-marie.couteyen@inria.fr>
  • To: "starpu-devel@lists.gforge.inria.fr" <starpu-devel@lists.gforge.inria.fr>
  • Subject: Re: [Starpu-devel] activity.data : nsubmitted, nready
  • Date: Tue, 25 Nov 2014 12:08:47 +0100
  • List-archive: <http://lists.gforge.inria.fr/pipermail/starpu-devel/>
  • List-id: "Developers list. For discussion of new features, code changes, etc." <starpu-devel.lists.gforge.inria.fr>

I made a patch that fix the issue for the 1.1.3 release, I did not look if it was compatible with the trunk (I prefer to stick with releases for my own usage right now).

I have chosen to count only task that will be scheduled (i.e. with a cl) and "nsubmitted" mean "submitted and uncompleted" in order to be consistent with the starpu_task_nsubmitted function.

I took the liberty to rename ntask in nready and add nsubmitted in the paje trace in the sched container.

I added the code for POTI too but did not test it. Anyway, is there any advantage to use POTI ?

Regards,

Jean-Marie

Le 17/11/2014 11:18, Samuel Thibault a écrit :
Jean-Marie Couteyen, le Fri 14 Nov 2014 19:02:03 +0100, a écrit :
The number of tasks left at the end of my executions is exactly the
difference between number of calls of "_starpu_push_task" and
"starpu_push_task_to_workers". (starpu_push_task is the only caller of
starpu_push_task_to_workers, at least in my executions.)

I suppose _STARPU_TRACE_JOB_PUSH macro should be used inside
"starpu_push_task_to_workers" instead of "_starpu_push_task".
Ah, right, for tasks with a NULL codelet that makes a difference. Also,
the other callers of starpu_push_task_to_workers will have called pop,
so it makes sense to push again.

Samuel

diff -rupN starpu-1.1.3/src/core/sched_policy.c
starpu-1.1.3-mod/src/core/sched_policy.c
--- starpu-1.1.3/src/core/sched_policy.c 2014-05-06 18:22:00.000000000
+0200
+++ starpu-1.1.3-mod/src/core/sched_policy.c 2014-11-25 11:53:45.000000000
+0100
@@ -336,7 +336,6 @@ int _starpu_push_task(struct _starpu_job

_STARPU_LOG_IN();

- _STARPU_TRACE_JOB_PUSH(task, task->priority > 0);
_starpu_increment_nready_tasks_of_sched_ctx(task->sched_ctx,
task->flops);
task->status = STARPU_TASK_READY;

@@ -393,6 +392,7 @@ int _starpu_push_task_to_workers(struct
{
struct _starpu_sched_ctx *sched_ctx =
_starpu_get_sched_ctx_struct(task->sched_ctx);
unsigned nworkers = 0;
+ _STARPU_TRACE_JOB_PUSH(task, task->priority > 0);

/* if the contexts still does not have workers put the task back to
its place in
the empty ctx list */
diff -rupN starpu-1.1.3/src/core/task.c starpu-1.1.3-mod/src/core/task.c
--- starpu-1.1.3/src/core/task.c 2014-08-27 17:36:30.000000000 +0200
+++ starpu-1.1.3-mod/src/core/task.c 2014-11-25 11:53:45.000000000 +0100
@@ -424,6 +424,7 @@ int starpu_task_submit(struct starpu_tas
if (task->cl)
{
unsigned i;
+ _STARPU_TRACE_UPDATE_TASK_CNT(0);

/* Check buffers */
if (task->dyn_handles == NULL)
diff -rupN starpu-1.1.3/src/debug/traces/starpu_fxt.c
starpu-1.1.3-mod/src/debug/traces/starpu_fxt.c
--- starpu-1.1.3/src/debug/traces/starpu_fxt.c 2014-08-18 13:57:56.000000000
+0200
+++ starpu-1.1.3-mod/src/debug/traces/starpu_fxt.c 2014-11-25
11:53:45.000000000 +0100
@@ -921,6 +921,7 @@ static void handle_memnode_event(struct
* Number of task submitted to the scheduler
*/
static int curq_size = 0;
+static int nsubmitted = 0;

static void handle_job_push(struct fxt_ev_64 *ev, struct starpu_fxt_options
*options)
{
@@ -934,9 +935,9 @@ static void handle_job_push(struct fxt_e
char container[STARPU_POTI_STR_LEN];

scheduler_container_alias(container, STARPU_POTI_STR_LEN,
options->file_prefix);
- poti_SetVariable(current_timestamp, container, "ntask",
(double)curq_size);
+ poti_SetVariable(current_timestamp, container, "nready",
(double)curq_size);
#else
- fprintf(out_paje_file, "13 %.9f %ssched ntask
%f\n", current_timestamp, options->file_prefix, (float)curq_size);
+ fprintf(out_paje_file, "13 %.9f %ssched nready
%f\n", current_timestamp, options->file_prefix, (float)curq_size);
#endif
}

@@ -949,29 +950,48 @@ static void handle_job_pop(struct fxt_ev
double current_timestamp = get_event_time_stamp(ev, options);

curq_size--;
+ nsubmitted--;

if (!options->no_counter && out_paje_file)
{
#ifdef STARPU_HAVE_POTI
char container[STARPU_POTI_STR_LEN];
scheduler_container_alias(container, STARPU_POTI_STR_LEN,
options->file_prefix);
- poti_SetVariable(current_timestamp, container, "ntask",
(double)curq_size);
+ poti_SetVariable(current_timestamp, container, "nready",
(double)curq_size);
+ poti_SetVariable(current_timestamp, container, "nsubmitted",
(double)nsubmitted);
#else
- fprintf(out_paje_file, "13 %.9f %ssched ntask
%f\n", current_timestamp, options->file_prefix, (float)curq_size);
+ fprintf(out_paje_file, "13 %.9f %ssched nready
%f\n", current_timestamp, options->file_prefix, (float)curq_size);
+ fprintf(out_paje_file, "13 %.9f %ssched nsubmitted %f\n",
current_timestamp, options->file_prefix, (float)nsubmitted);
#endif
}

if (activity_file)
+ {
fprintf(activity_file, "cnt_ready\t%.9f\t%d\n",
current_timestamp, curq_size);
+ fprintf(activity_file, "cnt_submitted\t%.9f\t%d\n", current_timestamp,
nsubmitted);
+ }
}

static
void handle_update_task_cnt(struct fxt_ev_64 *ev, struct starpu_fxt_options
*options)
{
double current_timestamp = get_event_time_stamp(ev, options);
- unsigned long nsubmitted = ev->param[0];
+
+ nsubmitted++;
+ if (!options->no_counter && out_paje_file)
+ {
+#ifdef STARPU_HAVE_POTI
+ char container[STARPU_POTI_STR_LEN];
+ scheduler_container_alias(container, STARPU_POTI_STR_LEN,
options->file_prefix);
+ poti_SetVariable(current_timestamp, container, "nsubmitted",
(double)nsubmitted);
+#else
+ fprintf(out_paje_file, "13 %.9f %ssched nsubmitted %f\n",
current_timestamp, options->file_prefix, (float)nsubmitted);
+#endif
+ }
+
+
if (activity_file)
- fprintf(activity_file, "cnt_submitted\t%.9f\t%lu\n",
current_timestamp, nsubmitted);
+ fprintf(activity_file, "cnt_submitted\t%.9f\t%lu\n",
current_timestamp, nsubmitted);
}

static void handle_codelet_tag(struct fxt_ev_64 *ev)
diff -rupN starpu-1.1.3/src/debug/traces/starpu_paje.c
starpu-1.1.3-mod/src/debug/traces/starpu_paje.c
--- starpu-1.1.3/src/debug/traces/starpu_paje.c 2014-04-30 18:33:10.000000000
+0200
+++ starpu-1.1.3-mod/src/debug/traces/starpu_paje.c 2014-11-25
11:53:45.000000000 +0100
@@ -201,7 +201,8 @@ void _starpu_fxt_write_paje_header(FILE
}

/* Types for the Scheduler */
- poti_DefineVariableType("ntask", "Sc", "Number of tasks", "0 0 0");
+ poti_DefineVariableType("nsubmitted", "Sc", "Number of Submitted
Uncompleted Tasks", "0 0 0");
+ poti_DefineVariableType("nready", "Sc", "Number of Ready Tasks", "0 0 0");

/* Link types */
poti_DefineLinkType("MPIL", "P", "MPICt", "MPICt", "Links between two
MPI Communication Threads");
@@ -228,7 +229,8 @@ void _starpu_fxt_write_paje_header(FILE
fprintf(file, "3 Ctx%u T \"InCtx%u\"
\n", i, i);
fprintf(file, "\
3 MS Mm \"Memory Node State\" \n\
-4 ntask Sc \"Number of tasks\" \n\
+4 nsubmitted Sc \"Number of Submitted Uncompleted Tasks\"
\n\
+4 nready Sc \"Number of Ready Tasks\"
\n\
4 bw Mm \"Bandwidth\" \n\
6 I S Initializing \"0.0 .7 1.0\" \n\
6 D S Deinitializing \"0.0 .1 .7\" \n\



Archives gérées par MHonArc 2.6.19+.

Haut de le page