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

Catching division by zeros

trnsys
Beginner
588 Views
is there a setting for the Fortran Compiler in the Compaq Visual Fortran Studio that will pausea program (and point to the offending line) when a divide by zero is executed? I have set all my Exceptions to "stop always" as opposed to "stop if not handled" but my program divides by zero - resulting in a variable that shows up as NaN - and continues to execute until a much later point when it can't continue and points me to the Disassembly Window. I am having a very hard time tracking down the location of the first division by zero and any help would be greatly appreciated.
0 Kudos
1 Reply
Jugoslav_Dujic
Valued Contributor II
588 Views

Project/Settings/Fortran/Floating Point/Exception handling -> change from 3 (default) to zero. Compiler switch is /fpe:0.

Jugoslav

0 Kudos
Reply