- changed status to open
- removed comment
Allow aligning the interior of grid functions in looping macros
Currently, when grid functions are aligned, Cactus expects their origin to be aligned. These changes update the looping macros to allow aligning the interior of grid functions instead. Whether and how grid functions are aligned is still determined by the driver -- this only makes it possible to still use the looping macros in this case.
Implemented in https://bitbucket.org/cactuscode/cactus/pull-request/16/allow-aligning-the-interior-of-grid/diff and https://bitbucket.org/cactuscode/cactustest/pull-request/1/allow-aligning-the-interior-of-grid/diff.
Keyword:
Comments (8)
-
reporter -
- removed comment
Looks fine to me. In fact I like the new way of making sure the final offset is smaller than the stride
- (bsnl (' const int cctki0_ioff = ' . (sep '', rpt '[I==1?(cctki0_imin:+cctki0_[C-1]ash*([C]]') . (sep '', rpt ')') . ' & (cctki0_istr-1);')), + (bsnl (' const int cctki0_ioff0 = ' . (sep '', rpt '[I==1?(cctki0_imin:+cctki0_[C-1]ash*([C]]') . (sep '', rpt ')') . ' + cctki0_imod;')), + # TODO: Omit this when grid arrays are aligned + (bsnl ' const int cctki0_ioff = cctki0_ioff0 % cctki0_istr;'),
better than the previous one since it allows for strides that are not powers of 2 (though I doubt we'll ever encounter those).
One thing that had a me a bit confused is the name "_mod" used to designate the offset argument (and not a modulus).
Please apply.
-
- changed status to open
- removed comment
-
- changed status to resolved
- removed comment
Merged.
-
- changed status to open
- removed comment
I had to revert f712bc6 (my bad for not trying the change beforehand) and believing the review.
The problem is that TestLoopCXXVectorized uses an un-pushed (?) macro CCTK_LOOP3STRMOD_ALL, and thus, fails to build.
https://bitbucket.org/cactuscode/cactustest/commits/all https://build.barrywardell.net/job/EinsteinToolkit/815/console
-
- changed status to open
- assigned issue to
- removed comment
-
The flesh change was been applied (in 2016) as git hash 5512e99c "Merged in eschnett/aligned-interior (pull request
#16)" of cactus.CCTK_LOOP3STRMOD_ALL
was renamed in git hash 886f0841 "Cactus: Loop macros: Rename "modulus" to "offset" for clarity" of cactus toCCTK_LOOP3STROFF_ALL
.CCTK_LOOP3STROFF_ALL
was removed in favor of cctkGH controlled alignments in git hash e896df97 "Cactus: Add cGH fields that describe grid function alignment" of cactusThis renders the explicit test moot since now the regular
CCTK_LOOP3STR_ALL
will test alignment and offsets if set by the driver. Carpet can set both, PUGH only ever aligns the very first point (offset=0
) but not later rows (soalignment=1
). -
- edited description
- changed status to resolved
- Log in to comment