Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
a39db7d
Remove deprecated stuff related to distributions -- dmap and class-ba…
bradcray Dec 16, 2025
abc3cdc
Add a pair of records to help wrap old layout classes in records
bradcray Jan 16, 2026
a5dc656
Update tests to avoid 'dmap'; removed one that ceased to have real pu…
bradcray Jan 17, 2026
a9d3c58
Update a few more tests
bradcray Jan 21, 2026
bf287ab
Add unstable warning to 'defaultDist'
bradcray Jan 21, 2026
af6c530
Merge branch 'main' of https://github.com/chapel-lang/chapel into rem…
bradcray Jan 21, 2026
f1fc3e9
Update tests sensitive to dead modules
bradcray Jan 22, 2026
ef13122
Remove LayoutCS from the make docs steps
bradcray Jan 22, 2026
ec9d137
Teach dyno about the new, internal (temporary?) name of dmap for defa…
bradcray Jan 22, 2026
dd63e04
Remove unstable warning from defaultDist, as it fires even through in…
bradcray Jan 23, 2026
2820323
Update tests that still used 'dmap' to use value-based distributions …
bradcray Jan 23, 2026
60bb560
Remove unstable warnings for defaultDist
bradcray Jan 23, 2026
e4d57bd
Restore whitespace to reduce diff
bradcray Jan 24, 2026
0fbd641
Remove 'new dmap()' from error message and improve its quality/simpli…
bradcray Feb 3, 2026
38c6189
Remove some stray 'dmap' references that Jade noticed and fix some dm…
bradcray Feb 3, 2026
48b2fe3
Updated doc to remove 'dmap' type and made other minor improvements
bradcray Feb 3, 2026
e761452
Update comment to reflect the code change I made earlier in this PR
bradcray Feb 3, 2026
aa597ae
Update comment to avoid 'dmap'
bradcray Feb 3, 2026
8495c68
Update notest test to avoid 'new dmap()' and update other aspects
bradcray Feb 3, 2026
d422ba8
Update doc test to avoid 'new dmap()' since it's no longer supported
bradcray Feb 3, 2026
ea7a9fc
Updated messages in this test to avoid 'dmap' (no longer used) and be…
bradcray Feb 3, 2026
787ea51
Remove references to 'dmap' in comments since it's no longer supported
bradcray Feb 3, 2026
02fdf1d
Update comments to avoid 'dmap'
bradcray Feb 3, 2026
7373789
Update test to avoid referring to the 'dmap' type
bradcray Feb 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions compiler/passes/normalize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1288,18 +1288,19 @@ static void lowerIfExprs(BaseAST* base) {
/************************************* | **************************************
* *
* Two cases are handled here: *
* 1. ('new' (dmap arg)) ==> (chpl__buildDistValue arg) *
* 1. ('new' (chpl_dmap arg)) ==> (chpl__buildDistValue arg) *
* 2. (chpl__distributed (Dist args)) ==> *
* (chpl__distributed (chpl__buildDistValue ('new' (Dist args)))), *
* where isDistClass(Dist). *
* *
* In 1., the only type that has FLAG_SYNTACTIC_DISTRIBUTION on it is "dmap". *
* This is a dummy record type that must be replaced. The call to *
* chpl__buildDistValue() performs this task, returning _newDistribution(x), *
* where x is a distribution. *
* In 1., the only type that has FLAG_SYNTACTIC_DISTRIBUTION on it is *
* "chpl_dmap". This is a dummy record type that must be replaced. The call *
* to chpl__buildDistValue() performs this task, returning *
* _newDistribution(x), where x is a distribution. At present, this pattern *
* should only still be in use for the creation of 'defaultDist'.*
* *
* 1. supports e.g. var x = new dmap(new Block(...)); *
* 2. supports e.g. var y = space dmapped Block (...); *
* 1. supports e.g. var x = new chpl_dmap(new blockDist(...)); *
* 2. supports e.g. var y = space dmapped new blockDist(...); *
* *
************************************** | *************************************/

Expand All @@ -1324,15 +1325,10 @@ static void processSyntacticDistributions(CallExpr* call) {
if (CallExpr* distCall = toCallExpr(call->get(1))) {
if (SymExpr* distClass = toSymExpr(distCall->baseExpr)) {
if (auto ts = expandTypeAlias(distClass)) {
const char* didYouMeanStr =
isDistClass(canonicalClassType(ts->type)) ?
"<domain> dmapped new dmap(new <DistName>(<args>))" :
"<domain> dmapped new <DistName>(<args>)";
USR_FATAL(
distCall,
"dmapped initialization expression requires a value, not a type "
"- did you mean to use '%s'?",
didYouMeanStr
"- did you mean to use '<domain> dmapped new %s(<args>)'?", ts->name
);
}
}
Expand Down
10 changes: 4 additions & 6 deletions doc/rst/language/spec/domain-maps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ Distributions are presented as follows:
.. index::
single: domain maps for domain types
single: domains; domain maps for
single: dmap value
single: dmapped clause
single: domain maps; dmap value
single: domain maps; dmapped clause
.. _Domain_Maps_For_Types:

Expand Down Expand Up @@ -160,7 +158,7 @@ type. The type inferred for a domain literal

use BlockDist;
var MyDomLiteral = {1..2,1..3};
var MyBlockedDom: domain(2) dmapped blockDist({1..5,1..6}) = MyDomLiteral;
var MyBlockedDom: domain(2) dmapped new blockDist({1..5,1..6}) = MyDomLiteral;

``MyDomLiteral`` is a domain literal and so will be mapped using
a default distribution. MyBlockedDom is given a type explicitly,
Expand Down Expand Up @@ -205,7 +203,7 @@ array was declared.
.. code-block:: chapel

use BlockDist;
var Dom: domain(2) dmapped blockDist({1..5,1..6}) = {1..5,1..6};
var Dom: domain(2) dmapped new blockDist({1..5,1..6}) = {1..5,1..6};
var MyArray: [Dom] real;

the distribution used for ``MyArray`` is the Block distribution from
Expand Down Expand Up @@ -240,7 +238,7 @@ determined by its type and so does not change upon a domain assignment.
.. code-block:: chapel

use BlockDist;
var Dom1: domain(2) dmapped blockDist({1..5,1..6}) = {1..5,1..6};
var Dom1: domain(2) dmapped new blockDist({1..5,1..6}) = {1..5,1..6};
var Dom2: domain(2) = Dom1;

``Dom2`` is mapped using a default distribution, despite ``Dom1``
Expand All @@ -264,7 +262,7 @@ determined by its type and so does not change upon a domain assignment.
.. code-block:: chapel

use BlockDist;
var Dom1: domain(2) dmapped blockDist({1..5,1..6}) = {1..5,1..6};
var Dom1: domain(2) dmapped new blockDist({1..5,1..6}) = {1..5,1..6};
var Dom2 = Dom1;

``Dom2`` is mapped using the same distribution as ``Dom1``. This is
Expand Down
62 changes: 34 additions & 28 deletions doc/rst/technotes/dsi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,39 +100,49 @@ Phase 1: The Essentials
======================================


class ``GlobalDistribution``
record ``GlobalDistribution``
----------------------------

This class is visible to the users of the domain map: the ``dmap`` wrapper
in Chapel's `dmapped` clauses wraps instances of this class.
This class must be a subclass of ``BaseDist``.
This record is visible to the users of the domain map in that
Chapel's `dmapped` clauses will take an instance of this record as
its argument expression.

.. method:: proc GlobalDistribution.GlobalDistribution() // or with arguments
.. method:: proc GlobalDistribution.init() // or with arguments

Constructor(s) These are not regulated by DSI - their specifics are
Initializer(s) These are not regulated by DSI - their specifics are
at the domain map implementor's discretion.

We suggest providing constructor(s) that accept, as an argument,
We suggest providing initializer(s) that accept, as an argument,
an array of locales over which to distribute, with ``Locales``
as the default value.

.. method:: proc GlobalDistribution.dsiClone(): GlobalDistribution
Most domain maps will also implement one of the following routines
depending on whether they support rectangular or associative
domains:

Returns a duplicate of `this`.
.. method:: proc GlobalDistribution.newRectangularDom(param rank: int,
type idxType,
param strides: strideKind,
ranges: rank*range(idxType, boundKind.both, strides),
definedConst: bool = false)
Comment on lines +123 to +127
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how well sphinx will render this, I don't think it can handle newlines in a .. method. Did you check it?


.. [TODO: the specifics. E.g. we need to specify when it is not enough
simply to return `this`. (Cf. the default domain map returns `this`.)]
(as well as a second overload with the same signature minus the
`ranges` argument).

.. method:: proc GlobalDistribution.dsiDisplayRepresentation(): void
This method creates and returns a new instance of ``GlobalDomain``
representing a rectangular domain with the specified rank, index
type, stride kind, per-dimension ranges (if specified), and
const-ness (provided to support execution-time optimizations).

A debugging method. It implements displayRepresentation()
on the dmap wrapper.

.. method:: proc GlobalDistribution.dsiEqualDMaps(that: /*some other GlobalDistribution*/): bool
.. method:: proc GlobalDistribution.newAssociativeDom(type idxType,
param parSafe: bool=true)

This method creates and returns a new instance of ``GlobalDomain``
representing an associative domain with the specified index type
and parallel-safety.


Return whether or not the two domain maps are "equal" (specify the
same distribution). This is invoked when ``==`` is applied to two
domain maps.


class ``GlobalDomain``
Expand All @@ -153,9 +163,9 @@ class ``GlobalDomain``
=========== ======================== ===================
domain kind creating method required superclass
=========== ======================== ===================
rectangular ``dsiNewRectangularDom`` ``BaseRectangularDom``
associative ``dsiNewAssociativeDom`` ``BaseAssociativeDom``
sparse ``dsiNewSparseDom`` ``BaseSparseDom``
rectangular ``newRectangularDom`` ``BaseRectangularDom``
associative ``newAssociativeDom`` ``BaseAssociativeDom``
sparse ``newSparseDom`` ``BaseSparseDom``
=========== ======================== ===================

It is legal for these methods to return instances of different classes
Expand Down Expand Up @@ -200,7 +210,7 @@ class ``GlobalDomain``
Returns this domain's domain map. This procedure should be provided as shown.
(Exception: see ``dsiLinksDistribution()``.)

.. method:: proc GlobalDistribution.dsiNewRectangularDom(param rank: int, type idxType, param strides: strideKind, inds) : GlobalDomain(rank, idxType, strides)
.. method:: proc GlobalDistribution.newRectangularDom(param rank: int, type idxType, param strides: strideKind, inds) : GlobalDomain(rank, idxType, strides)

This method is invoked when the Chapel program is creating a domain
value of the type domain(rank, idxType, strides) mapped using the
Expand Down Expand Up @@ -236,7 +246,7 @@ class ``GlobalDomain``
{ dsiSetIndices([(...rangesArg)]); }

It is used to initialize the index set of the object returned by
``dsiNewRectangularDom()`` to the index set of the corresponding Chapel
``newRectangularDom()`` to the index set of the corresponding Chapel
domain value.

.. method:: proc GlobalDomain.dsiAssignDomain(rhs: domain, lhsPrivate:bool): void
Expand Down Expand Up @@ -586,11 +596,10 @@ each of them could be implemented later, when the need arises.
The "unresolved call" compilation errors could be used
as an indication of what procedure(s) need to be defined.

.. method:: proc GlobalDistribution.dsiIndexToLocale(indexx): locale
.. method:: proc GlobalDistribution.indexToLocale(indexx): locale

Given an index ``indexx``, returns the locale that "owns" that index,
i.e. on which the corresponding data is located.
This is used to implement ``idxToLocale()`` on the ``dmap`` wrapper.

The domain map implementer is allowed to restrict the type of ``indexx``
that this method accepts.
Expand Down Expand Up @@ -696,9 +705,6 @@ The Chapel implementation:
The Chapel implementation creates privatized copies (over *all* locales)
greedily as follows (if that class supports privatization):

* of a ``GlobalDistribution`` - when it is wrapped in ``new dmap()``
and when that wrapper is copied;

* of a ``GlobalDomain`` or ``GlobalArray`` - when the corresponding
Chapel domain or array is created.

Expand Down
4 changes: 2 additions & 2 deletions frontend/lib/resolution/Resolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2845,8 +2845,8 @@ bool Resolver::resolveSpecialNewCall(const Call* call) {
auto newDecor = ClassTypeDecorator(ClassTypeDecorator::BORROWED_NONNIL);
initReceiverType = clsType->withDecorator(context, newDecor);
} else if (auto recordType = qtNewExpr.type()->toRecordType()) {
// Rewrite 'new dmap' to 'new _distribution'
if (recordType->id().symbolPath() == "ChapelArray.dmap") {
// Rewrite 'new chpl_dmap' to 'new _distribution'
if (recordType->id().symbolPath() == "ChapelArray.chpl_dmap") {
initReceiverType = CompositeType::getDistributionType(context);
}
}
Expand Down
1 change: 0 additions & 1 deletion modules/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ DISTS_TO_DOCUMENT = \
dists/dims/BlockCycDim.chpl \
dists/dims/BlockDim.chpl \
dists/dims/ReplicatedDim.chpl \
layouts/LayoutCS.chpl \
layouts/CompressedSparseLayout.chpl \


Expand Down
4 changes: 0 additions & 4 deletions modules/dists/BlockCycDist.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,6 @@ operator =(ref a: blockCycDist(?), b: blockCycDist(?)) {
}


@deprecated("'BlockCyclic' is deprecated, please use 'blockCycDist' instead")
type BlockCyclic = blockCycDist;


class BlockCyclicImpl : BaseDist, writeSerializable {
param rank: int;
type idxType = int;
Expand Down
16 changes: 0 additions & 16 deletions modules/dists/BlockDist.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ public use SparseBlockDist;
config param debugBlockDist = false;
config param debugBlockDistBulkTransfer = false;

@deprecated("'disableAliasedBulkTransfer' is deprecated and has no effect")
config const disableAliasedBulkTransfer = true;

config param disableBlockDistBulkTransfer = false;
config param disableBlockDistArrayViewElision = false;

Expand Down Expand Up @@ -145,15 +142,6 @@ bounding box are partitioned as evenly as possible across the target
locales. An index outside the bounding box is mapped to the same
locale as the nearest index within the bounding box.

.. Warning::

The ``blockDist`` distribution was, until recently, a class named
``Block``. Today, ``Block`` is still supported in a deprecated
form, yet is an alias to the ``blockDist`` record here. In our
experience, most uses of ``Block`` in distribution contexts should
continue to work, but updating to ``blockDist`` is requested going
forward due to the deprecation.

More precisely, an index ``idx`` is mapped to
``targetLocales[locIdx]``, where ``locIdx`` is computed as follows.

Expand Down Expand Up @@ -481,10 +469,6 @@ operator =(ref a: blockDist(?), b: blockDist(?)) {
}


@deprecated("'Block' is deprecated, please use 'blockDist' instead")
type Block = blockDist;


@chpldoc.nodoc
class BlockImpl : BaseDist, writeSerializable {
param rank: int;
Expand Down
12 changes: 0 additions & 12 deletions modules/dists/CyclicDist.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,6 @@ The ``cyclicDist`` distribution uses a round-robin partitioning to map
d-dimensional indices to a d-dimensional array of locales, starting
from a given index.

.. Warning::

The ``cyclicDist`` distribution was, until recently, a class named
``Cyclic``. Today, ``Cyclic`` is still supported in a deprecated
form, yet is an alias to the ``cyclicDist`` record here. In our
experience, most uses of ``Cyclic`` in distribution contexts should
continue to work, but updating to ``cyclicDist`` is requested going
forward due to the deprecation.

More precisely, for a ``cyclicDist`` distribution with:

============= ====================================================
Expand Down Expand Up @@ -343,9 +334,6 @@ operator =(ref a: cyclicDist(?), b: cyclicDist(?)) {
}
}

@deprecated("'Cyclic' is deprecated, please use 'cyclicDist' instead")
type Cyclic = cyclicDist;

@chpldoc.nodoc
class CyclicImpl: BaseDist, writeSerializable {
param rank: int;
Expand Down
Loading
Loading