diff --git a/src/engine.c b/src/engine.c index 6a7e5cc26777ac7939cebe16dc9f2ef87d2b1ba5..8218be32f7c30cd1dc52ea4efd5f6451a630cd92 100644 --- a/src/engine.c +++ b/src/engine.c @@ -2496,15 +2496,17 @@ void engine_step(struct engine *e) { e->time_step = (e->ti_current - e->ti_old) * e->time_base; } + /*****************************************************/ + /* OK, we now know what the next end of time-step is */ + /*****************************************************/ + + const ticks tic_updates = getticks(); + /* Update the cooling function */ if ((e->policy & engine_policy_cooling) || (e->policy & engine_policy_temperature)) cooling_update(e->cosmology, e->cooling_func, e->s); - /*****************************************************/ - /* OK, we now know what the next end of time-step is */ - /*****************************************************/ - /* Update the softening lengths */ if (e->policy & engine_policy_self_gravity) gravity_props_update(e->gravity_properties, e->cosmology); @@ -2514,6 +2516,10 @@ void engine_step(struct engine *e) { hydro_props_update(e->hydro_properties, e->gravity_properties, e->cosmology); + if (e->verbose) + message("Updating global quantities took %.3f %s", + clocks_from_ticks(getticks() - tic_updates), clocks_getunit()); + /* Trigger a tree-rebuild if we passed the frequency threshold */ if ((e->policy & engine_policy_self_gravity) && ((double)e->g_updates_since_rebuild > diff --git a/tools/analyse_runtime.py b/tools/analyse_runtime.py index fa15e3d4a77567de66d94ebd320e845d4636621f..382d4ab5cab100c04e82ae3b9813a37bec43bb0e 100755 --- a/tools/analyse_runtime.py +++ b/tools/analyse_runtime.py @@ -98,6 +98,7 @@ labels = [ ["engine_drift_top_multipoles:", 0], ["Communicating rebuild flag", 0], ["Writing step info to files", 0], + ["Updating general quantities", 0], ["task_dump_all:", 0], ["task_dump_stats:", 0], ["task_dump_active:", 0],