Proxy usage
Proxies... my favourite topic...
In engine_maketasks()
, in the MPI section, we do this:
/* Loop over the proxies. */
for (int pid = 0; pid < e->nr_proxies; pid++) {
/* Get a handle on the proxy. */
struct proxy *p = &e->proxies[pid];
/* Loop through the proxy's incoming cells and add the
recv tasks. */
for (int k = 0; k < p->nr_cells_in; k++)
engine_addtasks_recv(e, p->cells_in[k], NULL, NULL, NULL, NULL, 0, 0);
/* Loop through the proxy's outgoing cells and add the
send tasks. */
for (int k = 0; k < p->nr_cells_out; k++)
engine_addtasks_send(e, p->cells_out[k], p->cells_in[0], NULL, NULL, NULL, NULL);
}
In the last loop, I am confused by the use of p->cells_in[0]
. Is this actually correct ? I would have been tempted to put [k]
there