diff --git a/src/part.c b/src/part.c index db221dbd4bf9ff2b829b02fbae673aa1c65f339e..f45223d7cb8cec3ccec690f046cf2e0181bb5fa9 100644 --- a/src/part.c +++ b/src/part.c @@ -133,6 +133,8 @@ void part_verify_links(struct part *parts, struct gpart *gparts, struct spart *sparts, size_t nr_parts, size_t nr_gparts, size_t nr_sparts, int verbose) { + ticks tic = getticks(); + for (size_t k = 0; k < nr_gparts; ++k) { /* We have a DM particle */ @@ -246,6 +248,9 @@ void part_verify_links(struct part *parts, struct gpart *gparts, } if (verbose) message("All links OK"); + if (verbose) + message("took %.3f %s.", clocks_from_ticks(getticks() - tic), + clocks_getunit()); } #ifdef WITH_MPI diff --git a/src/space.c b/src/space.c index 0411016eee07a70a4bdff3c5f71c5e492b8d7d3f..ffc990e93381ff32f0e434acce348657528d68f4 100644 --- a/src/space.c +++ b/src/space.c @@ -1063,7 +1063,7 @@ void space_rebuild(struct space *s, int repartitioned, int verbose) { #endif /* Hook the cells up to the parts. */ - // tic = getticks(); + ticks tic2 = getticks(); struct part *finger = s->parts; struct xpart *xfinger = s->xparts; struct gpart *gfinger = s->gparts; @@ -1090,8 +1090,9 @@ void space_rebuild(struct space *s, int repartitioned, int verbose) { sfinger = &sfinger[c->stars.count]; } } - // message( "hooking up cells took %.3f %s." , - // clocks_from_ticks(getticks() - tic), clocks_getunit()); + if (verbose) + message("hooking up cells took %.3f %s.", + clocks_from_ticks(getticks() - tic2), clocks_getunit()); /* At this point, we have the upper-level cells, old or new. Now make sure that the parts in each cell are ok. */ @@ -2569,6 +2570,8 @@ void space_free_buff_sort_indices(struct space *s) { */ void space_list_cells_with_tasks(struct space *s) { + const ticks tic = getticks(); + s->nr_local_cells_with_tasks = 0; for (int i = 0; i < s->nr_cells; ++i) @@ -2579,6 +2582,10 @@ void space_list_cells_with_tasks(struct space *s) { if (s->e->verbose) message("Have %d local top-level cells with tasks (total=%d)", s->nr_local_cells_with_tasks, s->nr_cells); + + if (s->e->verbose) + message("took %.3f %s.", clocks_from_ticks(getticks() - tic), + clocks_getunit()); } /** @@ -2590,6 +2597,8 @@ void space_list_cells_with_tasks(struct space *s) { */ void space_list_local_cells(struct space *s) { + const ticks tic = getticks(); + s->nr_local_cells = 0; for (int i = 0; i < s->nr_cells; ++i) @@ -2601,6 +2610,10 @@ void space_list_local_cells(struct space *s) { if (s->e->verbose) message("Have %d local top-level cells (total=%d)", s->nr_local_cells, s->nr_cells); + + if (s->e->verbose) + message("took %.3f %s.", clocks_from_ticks(getticks() - tic), + clocks_getunit()); } void space_synchronize_particle_positions_mapper(void *map_data, int nr_gparts,