- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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).
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).
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
Thanks -- that would at least explain that!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page