Commit 61ca8f92 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

When done rebuilding, report the number cells and multipoles built as well as...

When done rebuilding, report the number cells and multipoles built as well as the memory required for them.
parent 7a71f99c
......@@ -2084,6 +2084,23 @@ void engine_rebuild(struct engine *e, int repartitioned,
/* Re-build the space. */
space_rebuild(e->s, repartitioned, e->verbose);
/* Report the number of cells and memory */
if (e->verbose)
message(
"Nr. of top-level cells: %d Nr. of local cells: %d memory use: %zd MB.",
e->s->nr_cells, e->s->tot_cells,
(e->s->nr_cells + e->s->tot_cells) * sizeof(struct cell) /
(1024 * 1024));
/* Report the number of multipoles and memory */
if (e->verbose && (e->policy & engine_policy_self_gravity))
message(
"Nr. of top-level mpoles: %d Nr. of local mpoles: %d memory use: %zd "
"MB.",
e->s->nr_cells, e->s->tot_cells,
(e->s->nr_cells + e->s->tot_cells) * sizeof(struct gravity_tensors) /
(1024 * 1024));
const ticks tic2 = getticks();
/* Update the global counters of particles */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment