From 582e5bd0e324954008be3781a7bf8e3c4a25480e Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <matthieu.schaller@durham.ac.uk> Date: Mon, 19 Mar 2018 10:04:15 +0100 Subject: [PATCH] Write information about the last step to stdout and to the time-step logs. --- examples/main.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/examples/main.c b/examples/main.c index 93bb6606c5..32d7651049 100644 --- a/examples/main.c +++ b/examples/main.c @@ -1013,6 +1013,24 @@ int main(int argc, char *argv[]) { (double)runner_hist_bins[k]); #endif + /* Write final time information */ + if (myrank == 0) { + + /* Print some information to the screen */ + printf(" %6d %14e %14e %14e %4d %4d %12zu %12zu %12zu %21.3f %6d\n", + e.step, e.time, e.cosmology->a, e.time_step, e.min_active_bin, + e.max_active_bin, e.updates, e.g_updates, e.s_updates, + e.wallclock_time, e.step_props); + fflush(stdout); + + fprintf(e.file_timesteps, + " %6d %14e %14e %14e %4d %4d %12zu %12zu %12zu %21.3f %6d\n", + e.step, e.time, e.cosmology->a, e.time_step, e.min_active_bin, + e.max_active_bin, e.updates, e.g_updates, e.s_updates, + e.wallclock_time, e.step_props); + fflush(e.file_timesteps); + } + /* Write final output. */ engine_drift_all(&e); engine_print_stats(&e); -- GitLab