Commit 31390109 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

MPI version of engine policy output

parent 2f96fdcd
......@@ -2250,9 +2250,19 @@ void engine_init(struct engine *e, struct space *s, float dt, int nr_threads,
*/
void engine_policy(struct engine *e) {
printf("engine_policy: Engine policies are [ ");
#ifdef WITH_MPI
if(e->nodeID == 0) {
printf("[000] engine_policy: engine policies are [ ");
for (int k = 1; k < 32; k++)
if (e->policy & 1 << k) printf(" %s,", engine_policy_names[k + 1]);
printf(" ]\n");
fflush(stdout);
}
#else
printf("engine_policy: engine policies are [ ");
for (int k = 1; k < 32; k++)
if (e->policy & 1 << k) printf(" %s,", engine_policy_names[k + 1]);
printf(" ]\n");
fflush(stdout);
#endif
}
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