Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Compiler Bug?

lklawrie
Beginner
981 Views
Traceback is giving me:

forrtl: severe (193): Run-Time Check Failure. The variable \'_windowmanager_mp_nusseltnumber$GNU901\' is being used without being defined
Image PC Routine Line Source
EnergyPlus.exe 0108A262 Unknown Unknown Unknown
EnergyPlus.exe 0068B609 _windowmanager_mp 4822 WindowManager.f90

But here is the code:
if(ra <= 1.0d4) gnu901 = 1.d0 + 1.7596678d-10 * ra**2.2984755d0 ! eq. 51
if(ra > 1.0d4 .and. ra <= 5.0d4) gnu901 = 0.028154d0 * ra**0.4134d0 ! eq. 50
if(ra > 5.0d4) gnu901 = 0.0673838d0 * ra**(1.0d0/3.0d0) ! eq. 49

gnu902 = 0.242d0 * (ra/asp)**.272d0 ! eq. 52
line 4822 gnu90 = MAX(gnu901,gnu902)

So, how can gnu901 be undefined?

(Debug run gives me a divide by zero in a different place -- which I think is the real cause).


0 Kudos
3 Replies
IanH
Honored Contributor III
981 Views
If the value of ra is NaN then none of the conditions in the if statements will evalute to true, and gnu901 will not be assigned a value. Perhaps that divide by zero results in ra getting such an exceptional value.
0 Kudos
lklawrie
Beginner
981 Views
Entirely possible as I'm running the debug with /fpe0 and I have to currently run the release form as /fpe1 due to a c code.

Thanks -- that would at least explain that!

0 Kudos
jimdempseyatthecove
Honored Contributor III
981 Views
You might also consider defensive coding:

if(ra <= 1.0d4) then
gnu901 = 1.d0 + 1.7596678d-10 * ra**2.2984755d0 ! eq. 51
elseif(ra > 1.0d4 .and. ra <= 5.0d4) then
gnu901 = 0.028154d0 * ra**0.4134d0 ! eq. 50
elseif(ra > 5.0d4)then
gnu901 = 0.0673838d0 * ra**(1.0d0/3.0d0) ! eq. 49
else
STOP("NaN")
endif

gnu902 = 0.242d0 * (ra/asp)**.272d0 ! eq. 52

(or use IF(ISNAN(ra)) STOP("NaN") in front of old code)

Jim Dempsey
0 Kudos
Reply