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

Signal after IEEE_HANDLER

sphost
Principiante
1.090 Vistas

Hi,

I use IEEE_HANDLER to handle FPE. When a FPE occurs, the function which was put in the parameter of IEEE_HANDLER is called.
As described in the document at the end of this function, the program terminates.

I try to catch the terminate signal SIGTERM of after thisfunctionbut it's seems that it's not this one...

Do you know which signal is sent ?

Thx in advance.

 

0 kudos
6 Respuestas
Kevin_D_Intel
Empleados
1.090 Vistas

After the interrupt handler, it appears termination is done via SIGKILL which can be neither caught nor ignored.

sphost
Principiante
1.090 Vistas

I reach to the same conclusion.

SIGNALQQ seems to not work when the Fortran code is called from C++.

I manage to catch the signal in the Fortran Code, using the function PXFSIGACTION.

Kevin_D_Intel
Empleados
1.090 Vistas
Sphost:

SIGNALQQ seems to not work when the Fortran code is called from C++.

I expect that relates to the Fortran RTLs not being initialized in the absence of a Fortran main.

Sphost:

I manage to catch the signal in the Fortran Code, using the function PXFSIGACTION.

The SIGFPE or SIGKILL?

sphost
Principiante
1.090 Vistas
MADkddavis:
Sphost:

SIGNALQQ seems to not work when the Fortran code is called from C++.

I expect that relates to the Fortran RTLs not being initialized in the absence of a Fortran main.

Sphost:

I manage to catch the signal in the Fortran Code, using the function PXFSIGACTION.

The SIGFPE or SIGKILL?



SIGFPE
sphost
Principiante
1.090 Vistas

So, I managed to catch the signal FPE in my fortran code, using PXFSIGACTION.

But, when I'm in my handler function how can I know what type of FPE occured ? (Divide by zero or others)

I was having this information when I handled with IEEE_HANDLE, but, as described before, with this type of handler, the program terminates at the end of the handler function with a signal that cannot be caught by my C++ main function

Kevin_D_Intel
Empleados
1.090 Vistas

Perhaps IEEE_FLAGS with the GET action will do, otherwise with the PXF routines you may have to define a signal set and check for membership via PXFSIGISMEMBER.

Responder