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

Overflow error

dudley_j
Beginner
534 Views
I have a DLL compiled with DVF 6.1A.
When called from a Visual Basic front end it will sometimes fail with an overflow error. When I set the debugger to break on all overflows (FP & integer) I never hit such a break point - the code will still fail, but will always return to the VB.
The failure occurs after (say) 7,000 time steps (solving a system of differential equations), so single-stepping gets a bit tedious - there are also c. 1300 equations, so single-stepping through the equations also gets a bit tedious.
The problem does not always occur, so it is tied in (I think) with the specific numbers on the problem cases - and I don't know what numbers are causing the problem.
Does anyone have advice as to what I can do to better trap the problem?
0 Kudos
2 Replies
greldak
Beginner
534 Views
Well assuming more breakpoints or 'run to cursor' doesn't help you can always fall back on the old methods of inserting appropriate write statements (or messageboxes for windows code) into your code.
0 Kudos
dudley_j
Beginner
534 Views
Thanks. The problem turned out to be a divide by zero that returned NaN to the Visual Basic; and Visual Basic in its turn handled this as an overflow error on the wrong variable. Roughly speaking, I had code of the form CALL EquationSolver(t, y[], dy[]) IF t at report point THEN do stuff with y[] END IF The NaN was in y[], and the overflow error was reported at the IF t statement. Last time I had this kind of problem was when the Fortran code addressed an array out of bounds, so I had searched the code for that.
0 Kudos
Reply