Skip to content
Snippets Groups Projects
Commit 52017fe7 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Also time the different sections of the tag exchange.

parent b208e644
No related branches found
No related tags found
1 merge request!606Merged gravity M-M tasks
......@@ -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.");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment