Opened 7 years ago
Closed 7 years ago
#772 closed bug (Fixed)
dateclock won't compile with gfortran.
Reported by: | kate | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | Release ROMS/TOMS 3.7 |
Component: | Nonlinear | Version: | 3.7 |
Keywords: | Cc: |
Description
I got this error from gfortran:
dateclock.f90:569:42: IF (DateNumber.ge.REAL(gregorian*86400,r8)) THEN 1 Error: Arithmetic overflow at (1)
It compiles with this fix:
diff --git a/ROMS/Utility/dateclock.F b/ROMS/Utility/dateclock.F index 55c6da41..6d8d17d4 100644 --- a/ROMS/Utility/dateclock.F +++ b/ROMS/Utility/dateclock.F @@ -586,7 +586,7 @@ MyDateNumber=DateNumber+Rclock%DateNumber(1) END IF ELSE - IF (DateNumber.ge.REAL(gregorian*86400,r8)) THEN + IF (DateNumber.ge.REAL(gregorian,r8)*86400) THEN MyDateNumber=DateNumber/86400.0_r8 ELSE MyDateNumber=(DateNumber+Rclock%DateNumber(2))/86400.0_r8
Change History (2)
comment:1 by , 7 years ago
Summary: | Latest won't compile with gfortran. → dateclock won't compile with gfortran. |
---|
comment:2 by , 7 years ago
Resolution: | → Fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Yep, thank you. It is an integer overflow because of the numbers are too big for interger*4. I just put the r8 in the wrong place.