From 01726dafa6afc48b39c009c9ed08f5dd3888281e Mon Sep 17 00:00:00 2001 From: James Willis <james.s.willis@durham.ac.uk> Date: Thu, 4 Jul 2019 15:24:08 +0100 Subject: [PATCH] Time more functions. --- src/fof.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/fof.c b/src/fof.c index b1412c8a19..3b214d79c6 100644 --- a/src/fof.c +++ b/src/fof.c @@ -2032,6 +2032,12 @@ void fof_search_foreign_cells(struct fof_props *props, const struct space *s) { } } + if (verbose) + message( + "Finding max no. of cells + offset IDs" + "took: %.3f %s.", + clocks_from_ticks(getticks() - tic), clocks_getunit()); + const int cell_pair_size = num_cells_in * num_cells_out; if (swift_memalign("fof_group_links", (void **)&props->group_links, @@ -2044,6 +2050,8 @@ void fof_search_foreign_cells(struct fof_props *props, const struct space *s) { cell_pair_size * sizeof(struct cell_pair_indices)) != 0) error("Error while allocating memory for FOF cell pair indices"); + ticks tic_pairs = getticks(); + /* Loop over cells_in and cells_out for each proxy and find which cells are in * range of each other to perform the FOF search. Store local cells that are * touching foreign cells in a list. */ @@ -2086,6 +2094,14 @@ void fof_search_foreign_cells(struct fof_props *props, const struct space *s) { } } + if (verbose) + message( + "Finding local/foreign cell pairs" + "took: %.3f %s.", + clocks_from_ticks(getticks() - tic_pairs), clocks_getunit()); + + ticks tic_set_roots = getticks(); + /* Set the root of outgoing particles. */ for (int i = 0; i < e->nr_proxies; i++) { @@ -2106,6 +2122,12 @@ void fof_search_foreign_cells(struct fof_props *props, const struct space *s) { } } } + + if (verbose) + message( + "Initialising particle roots " + "took: %.3f %s.", + clocks_from_ticks(getticks() - tic_set_roots), clocks_getunit()); if (verbose) message( -- GitLab