DSYEVX FPE and NANs

DSYEVX FPE and NANs

Imagen de seanm@quadrus.com


I have another one for you. I'm afraid I can't give you a lot of details, as I am having difficulty reproducing it outside of our program. Maybe you can give me some advice about where to look.

Basically, we are trying to calculater the eigenvalues and eigenvectors for a 135x135 matrix using DSYEVX. The matrix seems fine on input, but during the operation a floating-point invalid operation exception is triggered (we have the FPEs enabled). When I catch that exception and examine the matrix, it has a number of NANs.

Any idea what could cause that to happen? I just need a push in the right direction.

Thanks.

publicaciones de 5 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.
Imagen de yager@netease.com

just wondering if DSYEV works and gives the correct answer?

Imagen de michael.chuvelev

Which version of MKL do you have? Do NaNs appear at the tridiagonal reduction step, or further?

Imagen de seanm@quadrus.com



I've done some more digging, and the more I do, the more confused I get. If I try to reproduce this outside of my program, it all works fine as I said. Interestingly, a different path through my program also works fine.


We have FPEs enabled, so I tried disabling them for the call to DSYEVX. Suddenly the calculation takes WAY longer and when it pops out the number of eigenvalues is lower than expected (only 32). Interestingly, when it pops out the invalid operation bit must still be set, because the very next floating point operation causes an FPE to be thrown.


Now to your questions:


1) I switched the call over to DSYEV and it does work fine. Not sure that is necessarily indicative of anything, however, as it is difficult to reproduce at the best of times, and this could be one of the bad times.


2) We use MKL version 7.2.


3) How can you tell when the NANs appear?


Imagen de michael.chuvelev

Probably, the issue is due to denormalized numbers appear during the computation. If you're using Intel compilers 8.x, you can fix it to turning on flush-to-zero flag: -ftz.

As to #3, you could call DSYTRD on your matrix to reduce it to tridiagonal form (it's a part of DSYEV/DSYEVX), and examine the result to see if NaNs appear.

Did you register this issue on QuAD?

Inicie sesión para dejar un comentario.