diff --git a/src/proxy.c b/src/proxy.c index 1a395045bf80aa9940fb0934cc8b04eb6f3764ad..75654af0f13c1d2f5ee394d0e70cdc9bfc525717 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -39,6 +39,7 @@ /* Local headers. */ #include "cell.h" +#include "engine.h" #include "error.h" #include "space.h" @@ -62,6 +63,8 @@ void proxy_tags_exchange(struct proxy *proxies, int num_proxies, #ifdef WITH_MPI + ticks tic2 = getticks(); + /* Run through the cells and get the size of the tags that will be sent off. */ int count_out = 0; @@ -99,6 +102,10 @@ void proxy_tags_exchange(struct proxy *proxies, int num_proxies, } } + if (s->e->verbose) + message("Cell pack tags took %.3f %s.", + clocks_from_ticks(getticks() - tic2), clocks_getunit()); + /* Allocate the incoming and outgoing request handles. */ int num_reqs_out = 0; int num_reqs_in = 0; @@ -138,6 +145,8 @@ void proxy_tags_exchange(struct proxy *proxies, int num_proxies, } } + tic2 = getticks(); + /* Wait for each recv and unpack the tags into the local cells. */ for (int k = 0; k < num_reqs_in; k++) { int pid = MPI_UNDEFINED; @@ -149,6 +158,10 @@ void proxy_tags_exchange(struct proxy *proxies, int num_proxies, cell_unpack_tags(&tags_in[offset_in[cid]], &s->cells_top[cid]); } + if (s->e->verbose) + message("Cell unpack tags took %.3f %s.", + clocks_from_ticks(getticks() - tic2), clocks_getunit()); + /* Wait for all the sends to have completed. */ if (MPI_Waitall(num_reqs_out, reqs_out, MPI_STATUSES_IGNORE) != MPI_SUCCESS) error("MPI_Waitall on sends failed.");