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

Report the number of gparts on the nodes at the end of redistribute()

parent 148feb82
No related branches found
No related tags found
2 merge requests!136Master,!124Redistribute gparts
...@@ -247,7 +247,8 @@ void engine_redistribute(struct engine *e) { ...@@ -247,7 +247,8 @@ void engine_redistribute(struct engine *e) {
/* Get the new number of parts and gparts for this node */ /* Get the new number of parts and gparts for this node */
size_t nr_parts = 0, nr_gparts = 0; size_t nr_parts = 0, nr_gparts = 0;
for (int k = 0; k < nr_nodes; k++) nr_parts += counts[k * nr_nodes + nodeID]; for (int k = 0; k < nr_nodes; k++)
nr_parts += counts[k * nr_nodes + nodeID];
for (int k = 0; k < nr_nodes; k++) for (int k = 0; k < nr_nodes; k++)
nr_gparts += g_counts[k * nr_nodes + nodeID]; nr_gparts += g_counts[k * nr_nodes + nodeID];
...@@ -399,8 +400,8 @@ void engine_redistribute(struct engine *e) { ...@@ -399,8 +400,8 @@ void engine_redistribute(struct engine *e) {
int my_cells = 0; int my_cells = 0;
for (int k = 0; k < nr_cells; k++) for (int k = 0; k < nr_cells; k++)
if (cells[k].nodeID == nodeID) my_cells += 1; if (cells[k].nodeID == nodeID) my_cells += 1;
message("node %i now has %zi parts in %i cells.", nodeID, nr_parts, message("node %i now has %zi parts and %zi gparts in %i cells.",
my_cells); nodeID, nr_parts, nr_gparts, my_cells);
} }
if (e->verbose) if (e->verbose)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment