Commit 8c14753b authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Merge branch 'time_first_step' into 'master'

Time the initialisation step as well.

In times of difficult debugging that's the most minor change ever. The 0th time-step now also has an output displaying the wallclock time spent.

See merge request !156
parents 224739ee 786cf8f9
......@@ -1897,6 +1897,9 @@ void engine_init_particles(struct engine *e) {
struct space *s = e->s;
struct clocks_time time1, time2;
clocks_gettime(&time1);
if (e->nodeID == 0) message("Initialising particles");
/* Make sure all particles are ready to go */
......@@ -1959,8 +1962,11 @@ void engine_init_particles(struct engine *e) {
/* Apply some conversions (e.g. internal energy -> entropy) */
space_map_cells_pre(s, 0, cell_convert_hydro, NULL);
clocks_gettime(&time2);
/* Ready to go */
e->step = -1;
e->wallclock_time = (float)clocks_diff(&time1, &time2);
}
/**
......
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