Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29285 Discussions

No error message when devision with zero

akeg
Beginner
422 Views
If an error in the code, for example devision with zero or outside the range of a vector the old Compaq compiler told which line the problem occure but for Intel the compiler stops without any message. Is there a setting I have missed?
0 Kudos
2 Replies
Alexander_C_Intel
422 Views
Quoting - akeg
If an error in the code, for example devision with zero or outside the range of a vector the old Compaq compiler told which line the problem occure but for Intel the compiler stops without any message. Is there a setting I have missed?

With default settings the most of run-time checks are disabled.

To enable floating-point exception handling e.g. division by zero set /fpe:0 option. The default is /fpe:3 which disables floating-point exception handling and provides full IEEE support. If you examine the result of such operation you will see some exceptional number like Infinity or NaN.
If you are using IDE go to Floating-Point > Floating-Point Exception Handling of project Property page.

To enable check for vector/array bounds set /check:bounds option. The default is /nocheck that implies no checking is performed for run-time failures.
If you are using IDE go to Run-time > Check Array and String Bounds of project Property page. There are also some other run-time checks which you may want to apply there.
0 Kudos
DavidWhite
Valued Contributor II
422 Views

With default settings the most of run-time checks are disabled.

To enable floating-point exception handling e.g. division by zero set /fpe:0 option. The default is /fpe:3 which disables floating-point exception handling and provides full IEEE support. If you examine the result of such operation you will see some exceptional number like Infinity or NaN.
If you are using IDE go to Floating-Point > Floating-Point Exception Handling of project Property page.

To enable check for vector/array bounds set /check:bounds option. The default is /nocheck that implies no checking is performed for run-time failures.
If you are using IDE go to Run-time > Check Array and String Bounds of project Property page. There are also some other run-time checks which you may want to apply there.

In addtion, you will need to add the traceback option (haven't access to VS at present to give exact details). This will give the linenumbers of the caller tree indicating where the error occurred.

David
0 Kudos
Reply