diff options
author | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2006-07-24 08:37:47 +0000 |
---|---|---|
committer | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2006-07-24 08:37:47 +0000 |
commit | b1cca07c9e556ca79743f2255ad18cc100e80ee0 (patch) | |
tree | ea716b516034abf3a7809ef8c27a1625d565a9cf /src/comm | |
parent | d75b206f1cf044a2755661bfda6e1c2176194d27 (diff) |
Fix a bug in CactusDefaultSyncGroupsByDirI() where the flesh ran into an
infinite recursion if a driver didn't overload CCTK_SyncGroupsByDirI().
Thanks to Daniel Herbst and David Fiske for reporting this problem.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4352 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/comm')
-rw-r--r-- | src/comm/CactusDefaultComm.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/comm/CactusDefaultComm.c b/src/comm/CactusDefaultComm.c index ff0d96a4..b4b3741e 100644 --- a/src/comm/CactusDefaultComm.c +++ b/src/comm/CactusDefaultComm.c @@ -553,9 +553,10 @@ int CactusDefaultSyncGroupsByDirI (const cGH *GH, int num_groups, const int *directions) { int group, retval = 0; + char *groupname; static int user_has_been_notified = 0; - + /* individual directions aren't supported in the CCTK_SyncGroup* interface */ if (directions != NULL) { @@ -582,10 +583,12 @@ int CactusDefaultSyncGroupsByDirI (const cGH *GH, int num_groups, /* synchronise all groups one by one */ for (group = 0; group < num_groups; group++) { - if (CCTK_SyncGroupI (GH, groups[group]) == 0) + groupname = CCTK_GroupName (groups[group]); + if (CCTK_SyncGroup (GH, groupname) == 0) { retval++; } + free (groupname); } } |