Fix data access on device - #312
Open
tpadioleau wants to merge 1 commit into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #312 +/- ##
=======================================
Coverage 97.49% 97.50%
=======================================
Files 79 79
Lines 8629 8641 +12
=======================================
+ Hits 8413 8425 +12
Misses 216 216 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
julianlitz
approved these changes
Aug 10, 2026
| << "<DataArray type=\"Float64\" NumberOfComponents=\"3\" format=\"ascii\">\n"; | ||
| int i_r, i_theta; | ||
| double r, theta; | ||
| Vector<double> Fx("Fx", grid.numberOfNodes()); |
Collaborator
There was a problem hiding this comment.
You could use
levels_[0].rhs() and levels_[0].residual() as temporary storage to avoid this vector allocation.
Note that rhs() is filled with correct values at the start of each gmgpolar.solve() call. Also rhs() is no longer used after this writeSolutionToVTK function.
julianlitz
reviewed
Aug 10, 2026
| << "<DataArray type=\"Float64\" NumberOfComponents=\"3\" format=\"ascii\">\n"; | ||
| int i_r, i_theta; | ||
| double r, theta; | ||
| Vector<double> Fx("Fx", grid.numberOfNodes()); |
Collaborator
There was a problem hiding this comment.
Suggested change
| Vector<double> Fx("Fx", grid.numberOfNodes()); | |
| const int level_depth = 0; | |
| Vector<double> Fx = levels_[level_depth].rhs(); |
julianlitz
reviewed
Aug 10, 2026
| int i_r, i_theta; | ||
| double r, theta; | ||
| Vector<double> Fx("Fx", grid.numberOfNodes()); | ||
| Vector<double> Fy("Fy", grid.numberOfNodes()); |
Collaborator
There was a problem hiding this comment.
Suggested change
| Vector<double> Fy("Fy", grid.numberOfNodes()); | |
| Vector<double> Fy = levels_[level_depth].residual(); |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This error appeared when running tests with CUDA for spack/spack-packages#5820
Merge Request - GuideLine Checklist
Guideline to check code before resolve WIP and approval, respectively.
As many checkboxes as possible should be ticked.
Checks by code author:
Always to be checked:
If functions were changed or functionality was added:
If new functionality was added:
If new third party software is used:
If new mathematical methods or epidemiological terms are used:
Checks by code reviewer(s):