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

Error Trapping with SIGNALQQ (or other?)

Austen_D_
Beginner
347 Views

We are trying to use some signal handling to trap exceptions in our fortran program on Windows using SIGNALQQ.   It works for some errors but not for others, for example

forrtl: severe (408): fort: (10): Subscript #1 of the array TEMP_X has value 45 which is greater than the upper bound of 2

will not be caught by the error handler, but something like an access violation will be.  We  are using based off of an intel example we found

 i4ret = SIGNALQQ(SIG$ABORT, h_abort) 

 i4ret = SIGNALQQ(SIG$FPE, h_abort)       

 i4ret = SIGNALQQ(SIG$ILL, h_abort)      

 i4ret = SIGNALQQ(SIG$INT, h_abort)       

 i4ret = SIGNALQQ(SIG$SEGV, h_abort)       

 i4ret = SIGNALQQ(SIG$TERM, h_abort)   

Are we missing any here or is there a different way to trap 'other' error types before the program crashes?

0 Kudos
1 Reply
Steven_L_Intel1
Employee
347 Views

Not at this time, but in the next major release we'll have a new way of establishing a handler for all types of Fortran run-time errors.

0 Kudos
Reply