1454-projection-optimization #1549
Conversation
Claude Code ReviewHead SHA: 4f88e03 Files changed:
Findings1. Uninitialized
|
…nolithic subroutine for grid-cell parallelism
…draft of the grid parallelism subroutine. Deprecated cylinder value to only favor length_x being used
…tion of length_y and length_z for cylinders. All tests pass on GNU compilers for full test suite.
|
All AI review comments are now irrelevant because of significant changes that have occurred between now and that review. I doubt that this will pass the test suite on the first try, but on the off chance that it does we should not yet merge it. A data product of computational optimization performance should be presented before this PR is merged. Otherwise, it is unnecessary refactoring of the code. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1549 +/- ##
==========================================
- Coverage 60.91% 60.65% -0.26%
==========================================
Files 73 74 +1
Lines 20187 20108 -79
Branches 2938 2954 +16
==========================================
- Hits 12296 12197 -99
- Misses 5896 5903 +7
- Partials 1995 2008 +13 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Description
In many-particle cases, the limiting factor in the IBM compute is by far the time it takes to project the immersed boundaries onto the grid. This is fundamentally rooted in how we parallelize the work. The current code parallelizes of x, y, and z, but sequentially iterates through the IB patches. In cases where there are many IBs that are small, we are launching several (thousands) of GPU kernels each time step, but each kernel only works on hundreds of grid cells. Adding an option to parallelize over the thousands of particles should be significantly larger parallelism and thus optimize the projection.
In order to maintain the functionality of both parallelism methods, I need a separate set of geometry bounding checks. Since we perform a check in icpp patches and now 2 in IB patches, this is a significant amount of redundant code that must be maintained. To be somewhat forward-looking, I opted to merge all geometry checking into a single module that can be called from both forms of IB parallelism and the icpp pre_processing code. This should clean up the code nicely and significantly reduce code maintenance going forward. Since we can now change cylinder orientation with angles, I also deprecate the unneeded cylinder length checks.
The end result is the creation of a new module in common, the deletion of duplicate code, and a new parallelism path for IB patches when utilizing GPU compute.
Closes #1454, #1532, #1543
Type of change (delete unused ones)
Testing
All tests pass on GNU compiler
Checklist
Check these like this
[x]to indicate which of the below applies.See the developer guide for full coding standards.
GPU changes (expand if you modified
src/simulation/)AI code reviews
Reviews are not retriggered automatically. To request a review, comment on the PR:
@claude full review— Claude full review (also triggers on PR open/reopen/ready)claude-full-review— Claude full review via label