[petsc-users] [slepc] nan output for eigenvectors

Patrick Alken patrick.alken at geomag.info
Wed Sep 7 21:31:01 CDT 2022

It looks like my problem may be in using the older gcc 7.5.0 compiler. 
The nans seem to go away when I compile petsc/slepc and my code on a 
newer gcc 11.2 compiler.

Also, the petsc/slepc "make check" tests have errors on gcc 7.5 which 
disappear on 11.2.

On 9/7/22 01:20, Jose E. Roman wrote:
>> El 7 sept 2022, a las 6:18, Patrick Alken <patrick.alken at geomag.info> escribió:
>> I sometimes get Nan output values in computed eigenvectors for the generalized symmetric eigenvalue problem produced by slepc. Is this a known issue, and is it related to the conditioning of the matrix pair (A,B)? Is there some way to compute a "condition number" of the matrix pair ahead of time to see if i have a good chance of getting stable eigenvectors out?
> You should never get NaN. Can you send a reproducible example?
>> In a possibly related issue, i am finding that petsc/slepc compiled with debugging vs optimization can produce very different eigenvectors for the same problem, while the eigenvalues are the same. The eigenvectors seem more accurate when I use the debugging version of the libraries. Could this be also a conditioning problem with the matrix pair?
> What do you mean more accurate? The residual norm computed with EPSComputeError() should be below the tolerance in both debugging and optimized versions.
> Jose

More information about the petsc-users mailing list