diff options
author | tradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364> | 2000-08-04 13:29:18 +0000 |
---|---|---|
committer | tradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364> | 2000-08-04 13:29:18 +0000 |
commit | 612696f95a07fff1b8f589d1a6ab12266bfc4fce (patch) | |
tree | 55a43043e18173b105cddd5eb5bfb4f0a0dded04 /src | |
parent | 8ca4739232b07173d58feeb8e68d3f49242182a0 (diff) |
Allow ghostzone sizes of 0. This was buggy before.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@260 b61c5cb5-eaca-4651-9a7a-d64986f99364
Diffstat (limited to 'src')
-rw-r--r-- | src/Comm.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -8,7 +8,7 @@ @version $Header$ @@*/ -/*#define DEBUG_PUGH*/ +/*#define DEBUG_PUGH 1*/ #include <stdlib.h> #include <stdio.h> @@ -379,10 +379,10 @@ int PUGH_DisableGArrayGroupComm(pGH *pughGH, int first_var, pComm *groupcomm) { +#ifdef DEBUG_PUGH pGA *GA; /* first variable in group */ - -#ifdef DEBUG_PUGH + GA = (pGA *) pughGH->variables[first_var][0]; printf(" PUGH_DisableGArrayGroupComm: request for group " "with first var '%s'\n", GA->name); fflush(stdout); @@ -489,7 +489,7 @@ static int PUGH_EnableComm(pGH *pughGH, comm->recv_buffer[i] = NULL; } } - else + else /* no neighbor -> no comm buffers */ { comm->buffer_sz[i] = 0; comm->send_buffer[i] = NULL; @@ -512,21 +512,21 @@ static int PUGH_EnableComm(pGH *pughGH, { for (idir = 0; idir < 2 * GA->extras->dim; idir++) { - comm->docomm[idir] = 1; + comm->docomm[idir] = comm->buffer_sz[idir] > 0; } } else if (commflag == PUGH_PLUSFACESCOMM) { for (idir = 0; idir < GA->extras->dim; idir++) { - comm->docomm[2*idir+1] = 1; + comm->docomm[2*idir+1] = comm->buffer_sz[2*idir+1] > 0; } } else if (commflag == PUGH_MINUSFACESCOMM) { for (idir = 0; idir < GA->extras->dim; idir++) { - comm->docomm[2*idir] = 1; + comm->docomm[2*idir] = comm->buffer_sz[2*idir] > 0; } } else @@ -535,8 +535,8 @@ static int PUGH_EnableComm(pGH *pughGH, { if (commflag == PUGH_COMM(idir)) { - comm->docomm[2*idir] = 1; - comm->docomm[2*idir+1] = 1; + comm->docomm[2*idir] = comm->buffer_sz[2*idir] > 0; + comm->docomm[2*idir+1] = comm->buffer_sz[2*idir+1] > 0; } } } |