Branch: refs/heads/main
Revision: ab485c6b143bb2b99c783d234ce82b55b9fee6ab
Author: bradcray
Link: Add warnings/errors for stencil-distributed arrays of owned classes by bradcray · Pull Request #27454 · chapel-lang/chapel · GitHub
Log Message:
Add warnings/errors for stencil-distributed arrays of owned classes (#27454)
[reviewed by @lydia-duncan]
This follows up on a suggestion made by
Lydia
to generate a warning when creating a Stencil-distributed array, because
calling the updateFluff() method on such an array has the effect of
turning array elements into 'nil' values when they are copied into their
neighbor's caches (fluff) since the ownership will be transferred.
For some reason that I didn't have time to investigate, this generates
two warnings rather than one for a simple program. At present, my
thought is that two is better than zero. ![]()
I've also added an error for the case of a stencil-distributed array of
non-nilable owned classes because that case didn't make it through
compilation at all (and may not with other distributions either, but
since I was here…), so now we generate a cleaner error for it.
Diff:
M modules/dists/StencilDist.chpl
A test/distributions/stencil/stencilOfOwned-non-nil.chpl
A test/distributions/stencil/stencilOfOwned-non-nil.good
A test/distributions/stencil/stencilOfOwned.chpl
A test/distributions/stencil/stencilOfOwned.good
https://github.com/chapel-lang/chapel/pull/27454.diff