[Carpet] cost of repeated calls on CCTK_SyncGroup()
Thomas Radke
tradke at aei.mpg.de
Thu Jun 29 12:26:44 CEST 2006
Bela Szilagyi wrote:
> From what I understand
>
> Carpet::SyncProlongateGroups (const cGH* cctkGH, const vector<int>& groups)
>
> will not be reached from CCTK_Sync* calls.
No, all CCTK_Sync*() calls will eventually call
Carpet::SyncProlongateGroups(). But in a flesh loop, with only one group
at a time.
Currently there is no flesh-driver interface to pass a list of groups to
be synchronised. There is only CCTK_SyncGroup() which must be overloaded
by a driver. What you want is another overloadable function
CCTK_SyncGroups().
> If so, then can we
>
> 1) modify the flesh CCTK_SyncGroupsI function to call
> Carpet::SyncProlongateGroups once rather than calling Carpet::SyncGroup a
> nubmer of times, in case multiple groups are lined up for syncronization
>
> and/or
>
> 2) provide a simple (aliased function) interface to
> Carpet::SyncProlongateGroups.
>
> I would expect that 2) is quicker, though 1) is preferred. I guess "best"
> would be both.
The solution should be driver-independent which excludes 2) (unless we
add an equivalent aliased function in PUGH).
As mentioned above, another overloadable flesh function
CCTK_SyncGroups() (rather than an aliased function) would be a general
solution. I see two potential problems though:
* CCTK_SyncGroup() takes the groupname as an argument, so
CCTK_SyncGroups() would then take a array of groupnames.
Is this possible to pass such an array from Fortran ?
* We could instead add the overloadable function CCTK_SyncGroupsI()
(which already exists in the flesh API as a wrapper for
CCTK_SyncGroup()) and pass an array of group indices rather than
names. This would then break the convention of passing group/variable
names in overloadable functions.
I think that being able to efficiently synchronise a list of groups at
the same time via the flesh API is more important than sticking with a
convention of how to pass grid variables/groups. So let's add this new
overloadable function CCTK_SyncGroupsI(). I'd write a patch for it if
nobody objects.
--
Cheers, Thomas.
More information about the developers
mailing list