-
Notifications
You must be signed in to change notification settings - Fork 412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adjust domain map implementations to no longer require pragma #16064
Conversation
When noinit will be used in the array implementation, it will not be reasonable to turn it on and off with a flag. Also remove test/compflags/lydia/noUseNoinit The --no-use-noinit flag is removed so it does not make sense to keep these tests.
So that these could be depending on a field for noinit cases.
See test/arrays/sparse/sparse.chpl
See test/types/records/ferguson/array/array-in-record2.chpl
See the new test and also test/distributions/bradc/assoc/userAssoc-array-domain-zipper.chpl
Adds the flag --allow-noinit-array-not-pod for use in noinit tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The domain map interface changes and the noinit capability should be as much a highlight of the PR message as not requiring the pragma. For one, even after removing this pragma, there are still two more pragmas to remove before we can claim the ability to rely on user-facing features only.
Code changes are fine.
Rebuild parser after noinit PR PR #16064 made a small change to the parser but I forgot to commit the rebuilt parser. This PR commits the rebuilt parser. Trivial and not reviewed.
…ization Remove removeExcessDefaultInitialization.chpl Follow-on to PR #16064. The test removeExcessDefaultInitialization was failing after that PR. This test is a copy of test/expressions/noinit/assignAfterNoinit.chpl so just remove it. Test change only - not reviewed.
Add noinit technote Follow-up to PR #16064. The 1.23 release includes a very basic and restricted version of `noinit` because we were able to agree on the behavior of that case. The `noinit` feature is discussed in #15703 and #8792. The future work is discussed in #16172, #16173. Reviewed by @lydia-duncan - thanks!
For issue #15673.
Also for issues #15703 and #8792.
This PR:
dsiElementDeinitializationComplete
pragma "no auto destroy"
from domain map implementationsnoinit
arrays of POD elementsThe goal of this PR is to resolve issue #15673 by adjusting the domain
map implementations to no longer require the use of a
pragma "no auto destroy"
. Originally I was expecting to do that with anoinit
syntactic construction but it turns out that
noinit
is not strictlynecessary in this case since the
buildArray(..., initElts=false)
pattern already covers it. Either way, the array in question has memory
allocated for elements but the elements are totally uninitialized.
In particular, to remove the need for
pragma "no auto destroy"
, this PRadds a
deinitElts:bool
field to DefaultRectangular to indicate if theelements should be deinitialized when the array is destroyed. It adjusts
dsiElementInitializationComplete
to setdeinitElts
totrue
. It addsdsiElementDeinitializationComplete
to setdeinitElts
tofalse
(andalso allow similar behavior for other array types). It adjusts
dsiDestroyArr
for to checkthis.deinitElts
.Even though
noinit
is not used in the distribution implementations,this PR implements noinit for arrays of POD elements. For example,
Users should also indicate when (if ever) the array's elements are
completely initialized so that the memory can be registered to support
communication. That is the subject of issue #16173.
In order to easily test no-init of arrays, this PR adds a flag
--allow-noinit-array-not-pod
that will allow noinit of arrays ofnon-POD elements. It uses this in several tests along with a version of a
low-level move module added to the test system. Issue #16172 discusses
the design of a user-facing low-level move module.
Reviewed by @vasslitvinov - thanks!