From 04bec39148e3a11cd8db3cab3b1cfafbeba8ef51 Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <matthieu.schaller@durham.ac.uk> Date: Sun, 3 Apr 2016 18:07:47 +0100 Subject: [PATCH] Cleaner output at the end of every time-step --- examples/main.c | 9 +++------ src/engine.c | 4 ++-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/examples/main.c b/examples/main.c index 5fa541a5e3..023e8be500 100644 --- a/examples/main.c +++ b/examples/main.c @@ -432,13 +432,10 @@ int main(int argc, char *argv[]) { /* Legend */ if (myrank == 0) - printf( - "# Step Time time-step Number of updates Number of g-updates " - "CPU Wall-clock time [%s]\n", - clocks_getunit()); + printf("# %6s %14s %14s %10s %10s %16s [%s]\n", + "Step", "Time", "Time-step", "Updates", "g-Updates", + "Wall-clock time", clocks_getunit()); - return 0; - /* Let loose a runner on the space. */ for (int j = 0; !engine_is_done(&e); j++) { diff --git a/src/engine.c b/src/engine.c index 01b1400020..82ff038bb2 100644 --- a/src/engine.c +++ b/src/engine.c @@ -2024,8 +2024,8 @@ void engine_step(struct engine *e) { if (e->nodeID == 0) { /* Print some information to the screen */ - printf("%d %e %e %d %d %.3f\n", e->step, e->time, e->timeStep, updates, - g_updates, e->wallclock_time); + printf(" %6d %14e %14e %10d %10d %21.3f\n", e->step, e->time, e->timeStep, + updates, g_updates, e->wallclock_time); fflush(stdout); /* Write some energy statistics */ -- GitLab