Fix IB patch vel/angular_vel/angles broadcast inside wrong loop#1188
Fix IB patch vel/angular_vel/angles broadcast inside wrong loop#1188sbryngelson wants to merge 1 commit intoMFlowCode:masterfrom
Conversation
|
CodeAnt AI is reviewing your PR. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Nitpicks 🔍
|
|
CodeAnt AI finished reviewing your PR. |
There was a problem hiding this comment.
Pull request overview
Moves the patch_ib broadcasts for vel, angular_vel, and angles to the correct loop so they align with the other patch_ib fields and are broadcast for the proper num_patches_max range.
Changes:
- Removed
patch_ibvector broadcasts from thepatch_bcloop (num_bc_patches_maxcontext). - Added
patch_ibvector broadcasts alongside the otherpatch_ibbroadcasts (num_patches_maxcontext).
patch_ib vel, angular_vel, and angles were broadcast inside the num_bc_patches_max loop instead of the num_patches_max loop where the other patch_ib fields are broadcast. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
d291ca5 to
7c10279
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1188 +/- ##
=======================================
Coverage 44.05% 44.05%
=======================================
Files 70 70
Lines 20498 20498
Branches 1990 1990
=======================================
Hits 9030 9030
Misses 10329 10329
Partials 1139 1139 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Superseded by #1241 (batched low-risk fixes) |
Summary
Severity: HIGH — IB patch vel/angular_vel/angles broadcast in wrong loop with wrong bounds.
File:
src/pre_process/m_mpi_proxy.fpp, lines 79-81The
patch_ib(i)%vel,patch_ib(i)%angular_vel, andpatch_ib(i)%anglesbroadcasts are inside thedo i = 1, num_bc_patches_maxloop, but they referencepatch_ibwhich should be iterated up tonum_patches_max(where all otherpatch_ibfields are broadcast).Before
After
Moved the vel/angular_vel/angles broadcasts into the
num_patches_maxloop alongside the otherpatch_ibfields.Why this went undetected
If
num_bc_patches_max >= num_patches_max, all IB patches would still get broadcast (with some extra unnecessary iterations). Only fails when there are more IB patches than BC patches.Test plan
🤖 Generated with Claude Code
Fixes #1208