Remove short-circuit evaluation from IF statement#267
Remove short-circuit evaluation from IF statement#267tinyendian wants to merge 2 commits intoMetOffice:mainfrom
Conversation
315e5dc to
787dbf2
Compare
|
@thomasmelvin would you be willing to do the SciTech review? I'll contact the team otherwise. |
Yep no problem, assign it to me when you're ready |
|
Thanks @thomasmelvin, the PR should be good to go, but I don't have permission to reassign PRs in the Met Office repos - can you assign it to yourself? |
|
This all looks good. Passes Sci/Tech review. Ready for code review (when someone is assigned) |
|
Hi @TeranIvy I saw that you were mentioned for CodeReview for this PR - I cannot assign this ticket myself but thought I'd ping you in case you weren't aware. Thanks! |
Thanks, @tinyendian! I looked at the code and it all seems fine, so I put myself in the commit queue and I'll start testing whilst waiting. FYI, it may be next week at this point judging from the queue length. |
PR Summary
Sci/Tech Reviewer: @thomasmelvin
Code Reviewer: @TeranIvy
This PR replaces short circuit evaluation in a Fortran IF statement, which some compilers do not support (and the Fortran doesn't seem to define, e.g., https://fortranwiki.org/fortran/show/short-circuiting and https://community.intel.com/t5/Intel-Fortran-Compiler/IFX-AND-operator-evaluates-2nd-condition-even-if-first-one-is/m-p/1594666), with a default-override-style construct to resolve a segfault with the Intel OneAPI ifx compiler, closing #263. Similar constructs seem to have been used in other places to avoid this problem.
Code Quality Checklist
Testing
trac.log
Test Suite Results - lfric_apps - lfric_apps_short_circuit/run1
Suite Information
Task Information
✅ succeeded tasks - 41
Security Considerations
Performance Impact
AI Assistance and Attribution
Documentation
PSyclone Approval
Sci/Tech Review
(Please alert the code reviewer via a tag when you have approved the SR)
Code Review