Skip to content
Snippets Groups Projects
Commit 3cbbc677 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Do not report the task times when rebuilding after a repartiton. Do so before...

Do not report the task times when rebuilding after a repartiton. Do so before dumping the task array in engine_repartition()
parent 2fd23f69
Branches
Tags
1 merge request!1055Dump the FFT mesh to free more buffer space for the repartition
...@@ -210,6 +210,9 @@ void engine_repartition(struct engine *e) { ...@@ -210,6 +210,9 @@ void engine_repartition(struct engine *e) {
/* Sorting indices. */ /* Sorting indices. */
if (e->s->cells_top != NULL) space_free_cells(e->s); if (e->s->cells_top != NULL) space_free_cells(e->s);
/* Report the time spent in the different task categories */
if (e->verbose) scheduler_report_task_times(&e->sched, e->nr_threads);
/* Task arrays. */ /* Task arrays. */
scheduler_free_tasks(&e->sched); scheduler_free_tasks(&e->sched);
...@@ -1671,7 +1674,8 @@ void engine_rebuild(struct engine *e, const int repartitioned, ...@@ -1671,7 +1674,8 @@ void engine_rebuild(struct engine *e, const int repartitioned,
e->restarting = 0; e->restarting = 0;
/* Report the time spent in the different task categories */ /* Report the time spent in the different task categories */
if (e->verbose) scheduler_report_task_times(&e->sched, e->nr_threads); if (e->verbose && !repartitioned)
scheduler_report_task_times(&e->sched, e->nr_threads);
/* Give some breathing space */ /* Give some breathing space */
scheduler_free_tasks(&e->sched); scheduler_free_tasks(&e->sched);
......
...@@ -2286,6 +2286,7 @@ void scheduler_free_tasks(struct scheduler *s) { ...@@ -2286,6 +2286,7 @@ void scheduler_free_tasks(struct scheduler *s) {
s->tid_active = NULL; s->tid_active = NULL;
} }
s->size = 0; s->size = 0;
s->nr_tasks = 0;
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment