Skip to content
Snippets Groups Projects
Commit a815a53f authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

derive cell tags from a global counter, no longer from the cell pointer as...

derive cell tags from a global counter, no longer from the cell pointer as IntelMPI has a maximum value below 30 bits for its tags.


Former-commit-id: 18b6a9a9833a747d962bfb7657905811e3051620
parent ec6cf7c8
Branches
Tags
No related merge requests found
......@@ -53,6 +53,9 @@
#include "error.h"
#include "inline.h"
/* Global variables. */
int cell_next_tag = 0;
/**
* @brief Get the size of the cell subtree.
......@@ -178,7 +181,8 @@ 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 = ( ((long long int)c) / sizeof(struct cell) ) % (1 << 30);
// c->tag = pc->tag = ( ((long long int)c) / sizeof(struct cell) ) % (1 << 30);
c->tag = pc->tag = cell_next_tag++;
/* Fill in the progeny, depth-first recursion. */
for ( k = 0 ; k < 8 ; k++ )
......
......@@ -21,6 +21,10 @@
#define cell_sid_dt 13
/* Global variables. */
extern int cell_next_tag;
/* Packed cell. */
struct pcell {
......
......@@ -702,6 +702,7 @@ void engine_exchange_cells ( struct engine *e ) {
error( "Failed to allocate pcell buffer." );
/* Pack the cells. */
cell_next_tag = 0;
for ( k = 0 ; k < nr_cells ; k++ )
if ( cells[k].sendto ) {
cell_pack( &cells[k] , &pcells[ offset[k] ] );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment