What does 'floating invalid' error at 'isofwd.f' file mean?

This is the error I am getting in ‘make DEBUG=TRUE’ CMAQ 5.2.1 but could not identify the cause:

forrtl: error (65): floating invalid
Image              PC                Routine            Line        Source
CCTM_v521.exe  0000000001669A41  Unknown               Unknown  Unknown
CCTM_v521.exe  0000000001667B7B  Unknown               Unknown  Unknown
CCTM_v521.exe  000000000160C164  Unknown               Unknown  Unknown
CCTM_v521.exe  000000000160BF76  Unknown               Unknown  Unknown
CCTM_v521.exe  00000000015963D9  Unknown               Unknown  Unknown
CCTM_v521.exe  000000000159D28C  Unknown               Unknown  Unknown
libpthread-2.17.s  00002B2850C09630  Unknown               Unknown  Unknown
CCTM_v521.exe  00000000011E5CD2  funch6a_                 4076  isofwd.f
CCTM_v521.exe  00000000011E5558  calch6_                  3993  isofwd.f
CCTM_v521.exe  00000000011D3BC3  isrp3f_                   345  isofwd.f
CCTM_v521.exe  00000000011950CA  isoropia_                 202  isocom.f
CCTM_v521.exe  00000000011718A5  volinorg_                1383  aero_subs.F
CCTM_v521.exe  0000000001155EB2  aeroproc_                 335  aero_subs.F
CCTM_v521.exe  0000000001143BB1  aero_                     568  aero_driver.F
CCTM_v521.exe  0000000000B3FBCD  sciproc_                  248  sciproc.F
CCTM_v521.exe  0000000000B2E4FA  MAIN__                    453  driver.F
CCTM_v521.exe  000000000040AD5E  Unknown               Unknown  Unknown
libc-2.17.so       00002B2850E38555  __libc_start_main     Unknown  Unknown
CCTM_v521.exe  000000000040AC69  Unknown               Unknown  Unknown
srun: error: task 0: Aborted (core dumped)

Also, what is the meaning of ‘core dumped’?

It looks like you are getting an invalide floating point exception at line 4076 in the isofwd.f routine according to the following statements in your error message:

forrtl: error (65): floating invalid
CCTM_v521.exe  00000000011E5CD2  funch6a_                 4076  isofwd.f

Looking at the github repository for version 5.2.1, it looks like this line of code contains a square root caculation. Perhaps ‘DD’ a negative value, and trying to take the square root of a negative value caused the invalid floating point error.

Core dumps contain a record of where the code was in memory when an error occurred. Here is an explanation that may help. Understand and configure core dumps on Linux - Linux Audit

I am not familiar with the ISORROPIA code in CMAQv5.2.1 versus what is available in the current release CMAQv5.3.2. Is there a reason you are using this older version?

Looks like DD depends on BB and CC, which again depend on some more variables there. Maybe just printing out those variables will help?

Liz is exactly right on this one.

Floating-point arithmetic has inherent round-off error. So in the case of the quadratic formula for equations having a “double” root, you cannot expect that DD will be exactly zero; round off error may well force it to be negative in some (half) of the cases. The code should have had
DD =MAX( 0.0d0, BB*BB-4.d0*CC )
and likewise at several other places…

Some compilers “hide” the floating-point exceptions, and let the code silently get into trouble later. IMNHO, code should not be accepted unless it passes testing with “check=all” compiler-flag error checking.

ISORROPIA was developed in 1998. It has been incorporated in several regional and global chemical transport models besides CMAQ and has been used in research and regulatory applications far too numerous to list.

I would certainly not claim that the code is bug free. However, if you are getting a floating point exception from it, I would look elsewhere first.

The posting guidelines and debugging tutorial may help.

1 Like