Branch: refs/heads/main
Revision: f8752ff
Author: vasslitvinov
Link: Strenghten basic features of rectangular distributions by vasslitvinov · Pull Request #19307 · chapel-lang/chapel · GitHub
Log Message:
Merge pull request #19307 from vasslitvinov/strengthen-dsi-ops
Strenghten basic features of rectangular distributions
- Ensure there is a complete implementation of some basic
functionality for our rectangular distributions.
Distributions:
BlockCycDist.chpl
BlockDist.chpl
CyclicDist.chpl
DimensionalDist2D.chpl
ReplicatedDist.chpl
StencilDist.chpl
Methods:
dsiLow
dsiHigh
dsiAlignedLow
dsiAlignedHigh
dsiFirst
dsiLast
dsiStride
dsiAlignment
dsiNumIndices
dsiDim
dsiDim
dsiDims
dsiGetIndices
dsiMember
doiToString
dsiSerialWrite
dsiLocalSlice
dsiIndexOrder
dsiMyDist
These methods' implementations are identical for these distributions,
redirecting to the whole
domain. The only exception is that
StencilDom.dsiMember
returns true also if the index is within the
fluff area. I placed them together under a "common redirects" comment
in each distribution source file and removed existing scattered, partial
implementations.
- Get BlockCycDist and StencilDist to compile for idxType=int(32).
This involved minor fixes to ChapelDomain.chpl and ChapelRange.chpl.
This, plus some test fixes, allowed all of the robustness suite to
compile for these two distributions. Here is the scorecard for the
robustness suite:
distribution | #failures | #failures |
> before | after |
--------------|-----------|-----------|
DR --local | 0 | 0 |
DR | 16 | 16 |
block | 0 | 0 |
blockcyclic | 103 | 32 |
cyclic | 0 | 0 |
dimensional | n/a | n/a |
replicated | 0 | 0 |
stencil | 86 | 18 |
Testing is under gasnet except for "DR --local". In nightly testing we
do not test DR under gasnet, blockcyclic, dimensional, stencil.
Dimensional is not suitable for the robustness suite because
it supports only 2-d domains.
We are likely still ways away from getting these less-tested
distributions to work with unsigned idxTypes -- because I have seen
several places where we are using variables of idxType
for
stride-related values and, in StencilDist, for a value that can be
outright negative.
-
The above includes replacing
.size
with.sizeAs(int)
to avoid
a deprecation warning. We can replace these back wholesale once
the deprecation warning goes away. -
Get Dimensional and Replicated to pass
test/domains/userAPI/test2Ddomain.chpl
adapted to apply these two domain maps, with the exception that
localSubdomain() does not work for Dimensional on multiple
locales. Replace ReplicatedDom.domRep and ReplicatedDom.redirectee()
with ReplicatedDom.whole for simplicity and consistency. -
Beef up
distributions/robust/arithmetic/trivial
so it tests all
the methods under the "ensure" bullet above, by adding a couple of
tests and increasing the coverage in a couple of existing tests.
These new .good files are copies of existing ones:
from test/domains/userAPI/test2Ddomain.good :
test/distributions/dm/testUserAPI.good
(the original contents is replicated 4 times)
test/distributions/replicated/testUserAPI.good (a symlink)
from test/distributions/robust/arithmetic/basics/test_scan1.cyclic.good :
test/distributions/robust/arithmetic/basics/test_scan1.blockcyclic.good
test/distributions/robust/arithmetic/basics/test_scan1.stencil.good
r: @bmcdonald3 - thank you!
Modified Files:
A test/distributions/dm/testUserAPI.chpl
A test/distributions/dm/testUserAPI.good
A test/distributions/dm/testUserAPI.skipif
A test/distributions/replicated/testUserAPI.chpl
A test/distributions/replicated/testUserAPI.good
A test/distributions/replicated/testUserAPI.numlocales
A test/distributions/replicated/testUserAPI.prediff
A test/distributions/robust/arithmetic/basics/test_scan1.blockcyclic.good
A test/distributions/robust/arithmetic/basics/test_scan1.stencil.good
A test/distributions/robust/arithmetic/trivial/lowHighFirstLastStrideAlgn.chpl
A test/distributions/robust/arithmetic/trivial/lowHighFirstLastStrideAlgn.good
A test/distributions/robust/arithmetic/trivial/test_dot_dims.compopts
A test/distributions/robust/arithmetic/trivial/test_dot_stridable.chpl
A test/distributions/robust/arithmetic/trivial/test_dot_stridable.good
A test/distributions/robust/arithmetic/trivial/test_index_order.chpl
A test/distributions/robust/arithmetic/trivial/test_index_order.good
M modules/dists/BlockCycDist.chpl
M modules/dists/BlockDist.chpl
M modules/dists/CyclicDist.chpl
M modules/dists/DimensionalDist2D.chpl
M modules/dists/ReplicatedDist.chpl
M modules/dists/StencilDist.chpl
M modules/internal/ChapelDomain.chpl
M modules/internal/ChapelRange.chpl
M test/distributions/dm/PREDIFF
M test/distributions/robust/arithmetic/resizing/resizeFromOtherLocale.chpl
M test/distributions/robust/arithmetic/trivial/test_dot_dim.chpl
M test/distributions/robust/arithmetic/trivial/test_dot_dim.good
M test/distributions/robust/arithmetic/trivial/test_dot_dims.chpl
M test/distributions/robust/arithmetic/trivial/test_dot_dims.good
M test/distributions/robust/arithmetic/trivial/test_dot_rank.chpl
M test/distributions/robust/arithmetic/trivial/test_dot_rank.good
Compare: https://github.com/chapel-lang/chapel/compare/c397b9f86cd0...f8752ff3340f