Skip to content
Snippets Groups Projects
Commit 9d84db69 authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Now that we are skip 1, that cannot be used to pick out the active tasks for...

Now that we are skip 1, that cannot be used to pick out the active tasks for the thread info dumps, use task toc=0 instead
parent 6e30d519
Branches
Tags
1 merge request!267Mark tasks in drift2
......@@ -572,8 +572,8 @@ int main(int argc, char *argv[]) {
fprintf(file_thread, " %03i 0 0 0 0 %lli %lli 0 0 0 0 %lli\n", myrank,
e.tic_step, e.toc_step, cpufreq);
int count = 0;
for (int l = 0; l < e.sched.nr_tasks; l++)
if (!e.sched.tasks[l].skip && !e.sched.tasks[l].implicit) {
for (int l = 0; l < e.sched.nr_tasks; l++) {
if (!e.sched.tasks[l].implicit && e.sched.tasks[l].toc != 0) {
fprintf(
file_thread, " %03i %i %i %i %i %lli %lli %i %i %i %i %i\n",
myrank, e.sched.tasks[l].rid, e.sched.tasks[l].type,
......@@ -588,11 +588,10 @@ int main(int argc, char *argv[]) {
(e.sched.tasks[l].cj != NULL) ? e.sched.tasks[l].cj->gcount
: 0,
e.sched.tasks[l].flags);
fflush(stdout);
count++;
}
message("rank %d counted %d tasks", myrank, count);
fflush(stdout);
count++;
}
fclose(file_thread);
}
......@@ -608,8 +607,8 @@ int main(int argc, char *argv[]) {
/* Add some information to help with the plots */
fprintf(file_thread, " %i %i %i %i %lli %lli %i %i %i %lli\n", -2, -1, -1,
1, e.tic_step, e.toc_step, 0, 0, 0, cpufreq);
for (int l = 0; l < e.sched.nr_tasks; l++)
if (!e.sched.tasks[l].skip && !e.sched.tasks[l].implicit)
for (int l = 0; l < e.sched.nr_tasks; l++) {
if (!e.sched.tasks[l].implicit && e.sched.tasks[l].toc != 0) {
fprintf(
file_thread, " %i %i %i %i %lli %lli %i %i %i %i\n",
e.sched.tasks[l].rid, e.sched.tasks[l].type,
......@@ -619,6 +618,8 @@ int main(int argc, char *argv[]) {
(e.sched.tasks[l].cj == NULL) ? 0 : e.sched.tasks[l].cj->count,
(e.sched.tasks[l].ci == NULL) ? 0 : e.sched.tasks[l].ci->gcount,
(e.sched.tasks[l].cj == NULL) ? 0 : e.sched.tasks[l].cj->gcount);
}
}
fclose(file_thread);
#endif
}
......
......@@ -1040,10 +1040,12 @@ void scheduler_start(struct scheduler *s, unsigned int mask,
s->mask = mask;
s->submask = submask | (1 << task_subtype_none);
/* Clear all the waits and rids. */
/* Clear all the waits, rids and times. */
for (int k = 0; k < s->nr_tasks; k++) {
s->tasks[k].wait = 1;
s->tasks[k].rid = -1;
s->tasks[k].tic = 0;
s->tasks[k].toc = 0;
}
/* Re-wait the tasks. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment