-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Upgrade to PartitionedArrays v0.3 #16
Conversation
- Catch up to API changes for PartitionedArrays - Rewrite tests to use all available PArray backends (debug, mpi, native)
Thanks, I have been meaning to upgrade but didn't find the time. I had also planned to make it an extension, but that can be done separately. |
I see some failures on CI that I do not have locally. I'm suspecting that it is Julia 1.6 related. Will try to rewrite the test and update the PR... |
Required for Julia < 1.9
Ok, I think I figured it the test failure: In Julia 1.9 wrapping a pointer to a SubArray (view) is supported provided that the view is |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #16 +/- ##
==========================================
+ Coverage 77.37% 77.69% +0.32%
==========================================
Files 4 4
Lines 1118 1139 +21
==========================================
+ Hits 865 885 +20
- Misses 253 254 +1
☔ View full report in Codecov by Sentry. |
0ba3cb9
to
85f0601
Compare
Sorry for the slow review here. I want to catch up on the new PartitionedArrays API myself before reviewing/merging here. Feel free to |
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.
Thanks! Indeed, the new PartitionedArrays API is easier, but also I might have misused the old API too, it wasn't documented much at the time.
If we limit to HYPRE_Complex
as indicated, and if you update docs/Manifest.toml
we can merge and release this.
map_parts(dst.values, dst.owned_values, dst.rows.partition) do vv, _, vr | ||
il_src_part = vr.lid_to_gid[vr.oid_to_lid.start] | ||
iu_src_part = vr.lid_to_gid[vr.oid_to_lid.stop] | ||
map(own_values(dst), dst.index_partition) do ov, vr |
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.
I guess the SubArray issue can be circumvented by using local_values(dst)
here, right?
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.
I think so. I was not sure if HYPRE_IJVectorGetValues
would safely output the ghost values too.
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.
I was thinking the indices would just be for the owned ones, but it should be fine to essentially pass a too-long buffer to HYPRE_IJVectorGetValues
.
Registry PR: JuliaRegistries/General#84271 |
I noticed that PartitionedArrays has had a big API upgrade that was incompatible with HYPRE. I have made an attempt to rewrite the impacted functions and extend the tests to all backends. I think the latest API makes many of the interface operations a bit easier to write. With Julia 1.9 it might be relevant to also make some of the dependencies weak dependencies but this PR is just the API upgrade.