aboutsummaryrefslogtreecommitdiff
path: root/src/PostSendGA.c
diff options
context:
space:
mode:
authortradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364>2000-06-19 09:34:54 +0000
committertradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364>2000-06-19 09:34:54 +0000
commitd74b24f654c4fdad03fb0345795f5832f3c9317f (patch)
tree159dddff738612e6daa2118dad99dbcf38a40599 /src/PostSendGA.c
parentb9e2d6dd3e1dd80a060c245b6cc5848602a2e390 (diff)
Bugfix for syncing 1D GArrays.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@224 b61c5cb5-eaca-4651-9a7a-d64986f99364
Diffstat (limited to 'src/PostSendGA.c')
-rw-r--r--src/PostSendGA.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/PostSendGA.c b/src/PostSendGA.c
index ccaff91..3fc782e 100644
--- a/src/PostSendGA.c
+++ b/src/PostSendGA.c
@@ -96,7 +96,7 @@ void PostSendGA(pGH *pughGH, int dir, pComm *comm)
#ifdef DEBUG_PUGH
printf ("PostSendGA: into direction %d to proc %d with stag %d size %d for "
- "%d vars staring with '%s'\n",
+ "%d vars starting with '%s'\n",
dir, neighbour, stag, comm->buffer_sz[dir], comm->n_vars, GA->name);
#endif
@@ -155,8 +155,16 @@ void PostSendGA(pGH *pughGH, int dir, pComm *comm)
copy_to += copy_bytes;
}
- /* increment current looper */
- iterator[dim]++;
+ if (GA->extras->dim > 1)
+ {
+ /* increment current looper */
+ iterator[dim]++;
+ }
+ else
+ {
+ /* exit loop if array dim is 1D */
+ break;
+ }
} /* end of nested loops over all dimensions */