Fix time_real used uninitialized in Lagrangian bubble output#1189
Fix time_real used uninitialized in Lagrangian bubble output#1189sbryngelson 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 |
|
CodeAnt AI finished reviewing your PR. |
There was a problem hiding this comment.
Pull request overview
Fixes uninitialized time_real in Lagrangian bubble output by assigning it from file_time after the MPI broadcast, preventing garbage values in the time column.
Changes:
- Assign
time_real = file_timeafterMPI_BCASTin two bubble output code paths.
time_real is declared but never assigned from file_time after the MPI broadcast. The time column in output contains garbage. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
26c4854 to
fa2399b
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1189 +/- ##
=======================================
Coverage 44.05% 44.05%
=======================================
Files 70 70
Lines 20498 20500 +2
Branches 1990 1990
=======================================
+ Hits 9030 9032 +2
Misses 10329 10329
Partials 1139 1139 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Superseded by #1240 (batched safe fixes) |
Summary
Severity: HIGH — time column in Lagrangian bubble output contains garbage.
File:
src/post_process/m_data_output.fpp, lines 1059 and 1193 (also 1219 in the Silo output variant)time_realis declared as a local variable but never assigned fromfile_time(which is read from the restart file and broadcast). It is then written as the time column in the output, producing uninitialized garbage values.Before
After
Fixed in both the text output subroutine and the Silo database output subroutine.
Why this went undetected
Lagrangian bubble post-processing is a specialized feature. The other output columns (positions, velocities, radii) are correct, so users may not have noticed the time column being wrong.
Test plan
🤖 Generated with Claude Code
Fixes #1209