Has anybody tried to install a signal handler for SIGFPE using ecc+efc? We have done this succesfully using gcc on HPUX-IA64 and Linux-IA64/AMD64; however, they same code does not work when using ecc..
We follow typical (not sure if standard) UNIX procedure:
1 - Install the handler by calling either signal(SIGFPE,handlerfunc) or via sigaction.
2 - Trigger the exception (divide by zero/oveflow) and decode the exception within the handlerfunc when it arrives.
Using ecc, step seems to work (at least does not stop), but when the divide by zero (or overflow) is executed no exception is triggered.. Bizarre!!
We have used the same handlerfunc for Solaris (native), OSF1 (native), HPUX-IA64 (gcc only, acc does not work yet), and
Linux-IA64(gcc+efc) and Linux-AMD64(gcc+g77, PGI does not work yet).
I read the example on the Intel fortran user guide volume 1 (Error Handling section), but I could not understand the clear_signal example. To me, the sample code calls the handler directly not via triggering an exception..
Any ideas are welcome at this point. We would like to use the efc/ecc package for Linux-IA64..
I should admit that we are still using IFC 7.1.. Will IFC 8.1 make any difference?.. It is not easy to convince our colleagues and superior of a compiler upgrade because of the side effects a new compiler might bring..
Installing a custom SIGFPE handler