-
Notifications
You must be signed in to change notification settings - Fork 35
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
Object versioning for DataCarrier object #579
Merged
Merged
Changes from 3 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
0ff6b73
Object versioning for DataCarrier object (finality: firedrake.Constant)
nbouziani c945975
Update object versioning + add test
nbouziani f44f7eb
Merge remote-tracking branch 'origin/master' into DataCarrier-object-…
nbouziani 43aca1e
Merge remote-tracking branch 'origin/master' into DataCarrier-object-…
nbouziani 6e0178b
Merge remote-tracking branch 'origin/master' into DataCarrier-object-…
nbouziani fe63bf7
Merge remote-tracking branch 'origin/master' into DataCarrier-object-…
nbouziani e5af975
Update AUTHORS
nbouziani ff738b2
Merge branch 'master' into DataCarrier-object-versionning
nbouziani 516454d
Update data versioning for Dat and Mat (base and petsc_base classes)
nbouziani 07a47b3
Merge remote-tracking branch 'origin/master' into DataCarrier-object-…
nbouziani 29973b1
Add some missing DataCarrier inits
nbouziani 7d3d4be
Merge master
nbouziani 6d39e69
Merge remote-tracking branch 'origin/master' into DataCarrier-object-…
nbouziani 520078b
Add mat.py
nbouziani d89e93c
Refactor object versioning using PETSc state counter
nbouziani ca5e50d
Fix typo
nbouziani 54dd188
Add tests for Dat
nbouziani 18f9fa4
Remove spurious incrementations from VecAccessMixin
nbouziani 2836c7a
Cleanup
nbouziani 7bcde5a
Add dat_version to MixedDat + test
nbouziani 0e879bd
Specify petsc branch in ci.yml
nbouziani 55ad119
Update few things
nbouziani 82f9ac5
Update test + remove @abstractmethod from increment_dat_version
nbouziani 3edaf9a
Merge branch 'DataCarrier-object-versionning' of github.com:OP2/PyOP2…
nbouziani ba8d12c
Merge master
nbouziani 0989f1d
Fix lint
nbouziani a1d9d9f
Update ci.yml
nbouziani 9eabf60
Add tests for Dat context managers
nbouziani ff58332
Merge branch 'DataCarrier-object-versionning' of github.com:OP2/PyOP2…
nbouziani File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is a good start, but not all the places in which the data in a Dat or matrix can be modified. In
petsc_base.py
the.vec
, andvec_wo
context managers also induce modification of the data. (seeVecAccessMixin
). For matrices you should probably update the version inassemble
(but also other functions that sound like they modify data, like zero_rows/set_values...).Additionally, the halo exchange functions (global_to_local_end/local_to_global_end) might change data state as well (the user is allowed to call these).
Finally, the big one, a
par_loop
also updates argument state of all arguments other thanREAD
arguments. Probably adaptParLoop.update_arg_data_state
.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.
Thank you very much for you advice! I do apologize for my late reply, I have completely forgotten about this pending task! Yes, I initially pushed changes to handle
op2.Global
without consideringop2.Dat
/op2.Mat
because object versioning was at that time needed forfiredrake.Constant
only.I have just pushed some changes following your comment.
Regarding
assemble
: did you meanfiredrake.assemble
? My first guess to catch the various assembly calls performed onbase.Mat
was to update the data version inpetsc_base.Mat.assemble
but I am not sure that all assembly calls go through this route. In particular, unlikefiredrake.Matrix
,firedrake.ImplicitMatrix
does not seem to rely onbase.Mat
. Instead it uses the PETSc matrix object (PETSc.Mat()
), and I am not sure how these two play with each other.What do you think ?
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.
Naive question for ParLoop: Why would we need to adapt
update_arg_data_state
(which is called inParLoop.compute
) whereaslocal_to_global_end
, which is called after, will take into account the access mode to update the data version ?