Fix mv read loop hardcoding 4 instead of nnode#1190
Fix mv read loop hardcoding 4 instead of nnode#1190sbryngelson wants to merge 3 commits 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
This PR fixes a bug in the bubble restart file reading logic where the mv data file loop was hardcoded to iterate 4 times instead of using the nnode variable, which could cause incorrect file reads when nnode != 4.
Changes:
- Updated the
mvdata file loop to usennodeinstead of the hardcoded value4 - Corrected the file number offset calculation to use
nnodefor proper indexing
The pb loop just above correctly uses nnode for both the loop bound and file number offset. The mv loop should match. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
44e0f7f to
0870de7
Compare
…ommon Fix all remaining instances of the literal integer 4 representing the QBMM quadrature node count (nnode) across simulation and common modules, completing the nnode parameterization started in the PR. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fix remaining instances of the literal 4 representing QBMM quadrature node count in pre_process/m_global_parameters.fpp and m_start_up.fpp, consistent with the fixes already applied to common and simulation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1190 +/- ##
=======================================
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:
|
Summary
Severity: HIGH — mv data file loop uses wrong bounds and offsets when nnode != 4.
File:
src/pre_process/m_start_up.fpp, lines 479-482The
pb(pressure) read loop just above correctly usesnnodefor both the loop bound and file number offset calculation. Themv(mass/velocity) read loop immediately below hardcodes4instead.Before
After
Why this went undetected
nnodeis 4 in the most common configuration, so the hardcoded value happens to be correct.Test plan
🤖 Generated with Claude Code
Fixes #1210