[petsc-users] error with slepc shift invert: New nonzero at (0, 0) caused a malloc!

Jed Brown jedbrown at mcs.anl.gov
Tue Aug 27 09:18:51 CDT 2013


John Travers <jtravs at gmail.com> writes:

> Hi all,
>
> I'm trying to use shift and invert to find interior eigenvalues using slepc.
> I am using example 4 in slepc 3.41 which reads the matrix from a binary file ('A' saved from Matlab).
>
> If I run just:
> ./ex4 -file A -eps_nev 1
> the program runs fine, and correctly finds the largest eigenvalue (although much slower than Matlab's eigs).

You can't compare performance when running in debug mode.  If the
algorithm converges slower, we can figure out why.

> However, if I run:
> ./ex4 -file A -eps_nev 1 -st_type sinvert -st_shift 0.0,0.5
> to try and find an eigenvalue near 0.0+0.5i, it outputs the error message below.

Please just insert a value 0.0 along the diagonal of your matrix.
MatShift would be more expensive and could hide memory performance bugs
if it silently reallocated to add diagonal entries.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130827/25355897/attachment.pgp>


More information about the petsc-users mailing list