[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 10:11:26 CDT 2013
John Travers <jtravs at gmail.com> writes:
> Thanks for this. It wasn't obvious to me. I recompiled and get much
> better performance.
Great.
> OK, this solved my problem. Although I couldn't add zeros on the
> diagonal (the software I use to write the sparse matrices optimises
> this out), so I put a diagonal of 1e-300. Do you think this will cause
> inaccuracies in the calculations (so far it seems OK).
Anything at least 1e-16 smaller than the other entries is essentially
0.0 as far as floating point arithmetic is concerned. One possible
concern with 1e-300 is creating floating point exceptions due to
denormals. For example, if you get a NaN and then turn on trapping FP
exceptions (-fp_trap in PETSc) and try to debug, you might get a false
positive when the 1e-300 creates a denormal.
-------------- 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/a9af9618/attachment.pgp>
More information about the petsc-users
mailing list