[petsc-users] Bug report LMVM matrix class

Matthew Knepley knepley at gmail.com
Tue May 9 07:10:12 CDT 2023


On Tue, May 9, 2023 at 4:15 AM Stephan Köhler <
stephan.koehler at math.tu-freiberg.de> wrote:

> Dear PETSc/Tao team,
>
> it seems to be that there is a bug in the LMVM matrix class:
>
> The function MatMultAdd_LMVM, see, e.g.,
> https://petsc.org/release/src/ksp/ksp/utils/lmvm/lmvmimpl.c.html at line
> 114, if the vectors Y and Z are the same, then the result is wrong,
> since the first MatMult overwrites also the value in Y.
>

Yes, the condition for MatMultAdd() is that X is not the same as Z, so we
need to either disallow
this case, or create a work vector in order to handle it.

Todd, which should be done?

  Thanks,

     Matt

Best regards
> Stephan Köhler
>
> --
> Stephan Köhler
> TU Bergakademie Freiberg
> Institut für numerische Mathematik und Optimierung
>
> Akademiestraße 6
> 09599 Freiberg
> Gebäudeteil Mittelbau, Zimmer 2.07
>
> Telefon: +49 (0)3731 39-3173 (Büro)
>
>

-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230509/ec65d2b2/attachment.html>


More information about the petsc-users mailing list