value from GetLastErrorQQ

value from GetLastErrorQQ


To help track down an overflow error in a Fortran DLL, I am using a few of the system error routines including the ERRSNS subroutine, the GetLastError function, and GetLastErrorQQ function. I have found that I get a non-zero integer value (the error flag) from the GetLastErrorQQ function only, but not the other error routines. The help says that GetLastErrorQQ reports errors from a run time routine listed under that help topic. Could the error value also be set by routines other than those listed in the help (all the routine names listed end in QQ)? This DLL doesn't use any of those routines. The integer error code is = 33. The help file also directed me to look in the DFLIB.F90 routine in the /DF90/Include folder for the error constant. I've found a constant ERR$DOM = 33 but no explanation of what it means. Is there another resource to find error code numbers and their meaning for the GetLastErrorQQ function? It might help me to know what error = 33 means. So far I think that the error may be a NaN value due to a square-root of a negative value or a division by zero. Are there other error trapping routines that I should consider using to help track down the overflow error?

Thanks for your help,
Greg Thorwald

your code here
your code here
3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

GETLASTERRORQQ is like the Win32 API GetLastError - and may even be just a wrapper for that. This returns more information about errors detected during a Win32 API call, but won't have anything about hardware-detected errors such as a zerodivide.

What I suggest you do is this - follow the instructions here on how to debug a DLL. When the debugger starts, select Debug..Exceptions and make sure that floating overflow is set to "Stop Always". Now run your code. The debugger should stop when the error occurs and point you at the offending code.


Steve - Intel Developer Support


Thanks for your reply and the debugging information. I'll need to coordinate with the VB developer to try the DLL debugging method. I develop the Fortran DLLs but the VB code comes from a different developer (no VB on my machine). Since I often need to debug new features in the DLL I have a Fortran program that will initialize the inputs and drive the DLL. However, for this particular bug I wasn't able to cause the program to crash or stop at the invalid math operation (had set the options in the Fortran run time project settings). I'll look more closely at the debug options available.

I did eventually find the bug; turned out to be a square-root of a tiny negative number in a function deep down in the DLL. The value should have been zero, but the function should have been checking for possible round-off values. Since there was some error checking in the routine calling the function the bad value was discarded and the calculation continued. The overflow error message box didn't show up until the entire calcualtion was complete.

Thanks again,
Greg Thorwald

Leave a Comment

Please sign in to add a comment. Not a member? Join today