Commit d02fc045 authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

generate tags from cell pointers.


Former-commit-id: 8c4dd68746b0823ac7407a1e22b594f5041c232d
parent 1a388cc1
......@@ -176,7 +176,7 @@ int cell_pack ( struct cell *c , struct pcell *pc ) {
pc->dt_min = c->dt_min;
pc->dt_max = c->dt_max;
pc->count = c->count;
c->tag = pc->tag = rand() % (1 << 24);
c->tag = pc->tag = ( ((long long int)c) / sizeof(struct cell) ) % (1 << 30);
/* Fill in the progeny, depth-first recursion. */
for ( k = 0 ; k < 8 ; k++ )
......
......@@ -743,7 +743,7 @@ int engine_exchange_strays ( struct engine *e , struct part *parts , struct xpar
/* Wait for each part array to come in and collect the new
parts from the proxies. */
for ( k = 0 ; k < nr_in ; k++ ) {
for ( k = 0 ; k < 2*(nr_in + nr_out) ; k++ ) {
if ( MPI_Waitany( 2*e->nr_proxies , reqs_in , &pid , &status ) != MPI_SUCCESS ||
pid == MPI_UNDEFINED )
error( "MPI_Waitany failed." );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment