suppress floating invalid in runtime check due to large number

suppress floating invalid in runtime check due to large number

Bild des Benutzers miro_ilias

Dear Sirs,

I have ifort (IFORT) 12.1.3 20120212 on the Linux Debian server, and I would to suppress error message with runtime-checking flags.

The short F90 testing program is attached.

First, I got the code code execution proper :

:~/work/programming/various/floating_invalid/.ifort -i8 -g -O0 test.F90 test.F90(8): remark #7960: The floating overflow condition was detected while evaluating this operation; the result is an Infinity. [1.7976931348623157E+308]

real(kind=kreal) :: total_mem_new=1.7976931348623157e+308
------------------------------------^
:~/work/programming/various/floating_invalid/.a.out
1 maxcor= -9223372036854775808
2 maxcor= -9223372036854775808
3 maxcor= -9223372036854775808

Is there a way please to supress this error below without removing "check"-flags ? I need to have all runtime checking flags active in our big project to be able to catch bugs in other parts of the code.

:~/work/programming/various/floating_invalid/.ifort -i8 -g -w -assume byterecl -DVAR_IFORT -traceback -check bounds -fpstkchk -check pointers -check uninit -check output_conversion -ftrapuv -O0 test.F90
:~/work/programming/various/floating_invalid/.a.out
forrtl: error (65): floating invalid
Image PC Routine Line Source
a.out 000000000041F742 Unknown Unknown Unknown
a.out 0000000000401DC9 MAIN__ 10 test.F90
a.out 0000000000401D2C Unknown Unknown Unknown
libc.so.6 00007FA8A7989C4D Unknown Unknown Unknown
a.out 0000000000401C29 Unknown Unknown Unknown
Aborted

Thanks, Miro

AnhangGröße
Herunterladen test.f90502 Bytes
2 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.
Bild des Benutzers jimdempseyatthecove

Look in reference guide for IEEE_HANDLER.

You might want to setup a handler to catch all errors, and in which you can then set a break point. With this in place, when error occurs, you can get more information than a traceback. In release mode you could selectively clear acceptible errors (overflow, underflow, whatever). And with the addition of some global flags known to the handler (and those in the know) you can use flags to permit some errors at specific points within the program, as well as signal back a condition (faster than calling function to test for condition after each operation).

Jim Dempsey

www.quickthreadprogramming.com

Melden Sie sich an, um einen Kommentar zu hinterlassen.