-
Notifications
You must be signed in to change notification settings - Fork 524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Floating point exception in w3fld1md.F90 #1169
Labels
bug
Something isn't working
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Running a
Debug
build with additional flags captures a divide-by-zero floating point exception inw3fld1md.F90
.To Reproduce
b
from regtestww3_ufs1.1/unstr
Debug
cmake type, and additionally, appends these compile flags:Expected behavior
forrtl: error (75): floating point exception
due to a divide-by-zero occurring in a test condition parameter,within subroutine
W3FLD1
ofw3fld1md.F90
. HereTAUDIR = -TAUDIRB
, where the values are floating point approximations nearPi
. See sample truncated with added write statement output:I hit this error looking for a different issue, so I bypassed it with
IF
logic. It's just a mathematical bypass though -- I don't know what the science considerations are currently. I rationalized that in these cases, you have a finite number over zero, and taking the liberty to view that as a limit, as the denominator approaching zero, then the term approaches a very large number, and it only needs to be greater than0.1
, so assign it.true.
.Screenshots
Additional context
Fyi, this new issue #1159 also has floating point divide by zero. It's in a different subroutine, but same module,
W3FLD1MD
. The related pr #1163.The text was updated successfully, but these errors were encountered: