From 672f2d8992a6c6ac83e7ea0732ccf98f27017004 Mon Sep 17 00:00:00 2001 From: lhausamm <loic_hausammann@hotmail.com> Date: Tue, 29 Aug 2017 17:26:54 +0200 Subject: [PATCH] Compute correctly the number of task - The index file seems to be good --- src/engine.c | 6 ++++++ src/runner.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/engine.c b/src/engine.c index 961a2fae33..52f117548b 100644 --- a/src/engine.c +++ b/src/engine.c @@ -3639,6 +3639,8 @@ void engine_maketasks(struct engine *e) { e->size_links += s->tot_cells * self_grav_tasks_per_cell; if (e->policy & engine_policy_stars) e->size_links += s->tot_cells * stars_tasks_per_cell; + if (e->policy & engine_policy_logger) + e->size_links += s->tot_cells; /* Allocate the new link list */ if ((e->links = (struct link *)malloc(sizeof(struct link) * e->size_links)) == @@ -4437,6 +4439,10 @@ int engine_estimate_nr_tasks(struct engine *e) { if (e->policy & engine_policy_stars) { n1 += 2; } + if (e->policy & engine_policy_logger) { + n1 += 1; + n2 += 1; + } #ifdef WITH_MPI diff --git a/src/runner.c b/src/runner.c index 444a4b6312..7ebe05cb39 100644 --- a/src/runner.c +++ b/src/runner.c @@ -2742,7 +2742,7 @@ void runner_do_logger(struct runner *r, struct cell *c, int timer) { logger_mask_u | logger_mask_h | logger_mask_rho | logger_mask_consts, &p->last_offset, e->logger_dump); - message("Offset: %lu", p->last_offset); + //message("Offset: %lu", p->last_offset); /* Set counter back to zero */ p->last_output = 0; } -- GitLab