27131, "e-kayrakli", "[Feature Request]: A better alternative than 'isDefaultRectangular' for checking whether an array/domain is local", "2025-04-21T17:15:08Z"
Summary of Feature
Description:
Today, the go-to user-facing way of checking whether an array or domain is distributed is to call the isDefaultRectangular
method on them. But the term "default rectangular" is not something user-facing nor intuitive. Can we add a method with a more intuitive name.
Is this issue currently blocking your progress?
No
Code Sample
myArray.isDistributed();
My first reflex was isLocal
, but that's tricky. An array can be non-distributed but remote.
Arguably, isDistributed
also has some gotchas:
- Is a block-distributed array "distributed", if the program is run with
-nl1
? - Is it distributed if its
targetLocales
only has a single locale?
To me, the answer is "yes" in both scenarios, but I admit that cases like these are where isDefaultRectangular
seems more precise.
An interesting take could be something like hasDistribution
. Technically, all arrays and domains have distribution
s in Chapel, but they are not very first class in the language, and from a user's perspective, it may be thought as if non-distributed arrays don't have a distribution.