Fix integer(wp) non-standard kind for loop variables in bubble module#1182
Fix integer(wp) non-standard kind for loop variables in bubble module#1182sbryngelson wants to merge 1 commit into
Conversation
wp is a real kind parameter. integer(wp) is non-standard and may produce wrong-sized integers on strict compilers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
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
Updates loop variable declarations in the Euler–Euler bubbles module to avoid using a non-standard integer kind derived from a real kind parameter (wp), improving portability with strict Fortran compilers.
Changes:
- Replaced
integer(wp)with plainintegerfor loop indices ins_comp_alpha_from_n.
|
Closing: integer(wp) is valid Fortran — wp as a kind parameter gives a legal integer kind. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1182 +/- ##
=======================================
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 — non-standard integer kind may produce wrong-sized loop variables.
File:
src/simulation/m_bubbles_EE.fpp, line 77Loop variables
i, j, k, lare declared asinteger(wp)wherewpis a real kind parameter (e.g., 8 for double precision).integer(wp)is non-standard Fortran — it uses the real kind selector as an integer kind, which may produce wrong-sized integers on strict compilers.Before
After
Why this went undetected
Most compilers silently accept
integer(8)as a valid 8-byte integer kind, so this happens to work whenwp=8. Would fail on compilers where kind 8 is not a valid integer kind.Test plan
-std=f2018)🤖 Generated with Claude Code