[petsc-dev] Faulty logic in MatHYPRESetPreallocation?
Pierre Jolivet
pierre.jolivet at enseeiht.fr
Fri Jan 4 01:26:12 CST 2019
Stefano,
Please find attach a trivial example that will segfault from within hypre if you put back on the (IMHO unnecessary) hypre_AuxParCSRMatrixNeedAux(aux_matrix) = 1 in PR #1305.
You need to use two processes or more.
Thanks,
Pierre
> On 29 Dec 2018, at 10:13 AM, Stefano Zampini <stefano.zampini at gmail.com> wrote:
>
> Barry,
>
> Probably this is an oversight from me. When I coded the MATHYPRE class, I did not make much attention to the preallocation. Also, hypre did not seem very robust to matrix reusage at the time. Take a look at the comments at line 85 in ex115 from mat tests. Probably Pierre's fix will curate that problem too.
>
> Stefano
>
> Il giorno Sab 22 Dic 2018, 06:30 Smith, Barry F. <bsmith at mcs.anl.gov <mailto:bsmith at mcs.anl.gov>> ha scritto:
>
> Stefeno,
>
> Doe this look right to you?
>
> Thanks
>
> Barry
>
>
> > On Dec 17, 2018, at 3:18 AM, Pierre Jolivet via petsc-dev <petsc-dev at mcs.anl.gov <mailto:petsc-dev at mcs.anl.gov>> wrote:
> >
> > Hello,
> > I am not sure the hypre routines are called in the right order in MatHYPRESetPreallocation.
> > Indeed, attached, you’ll find two Massif logs, one with the current order (massif.out.bad), and the other (massif.out.better) with the attached patch applied.
> > In the former, you can see at the snapshot #31 that there is a call to hypre_CTAlloc in hypre_AuxParCSRMatrixInitialize (aux_parcsr_matrix.c:163).
> > This means that hypre is allocating memory as if it was not aware of the number of nonzero per row, even though I supply in my application the two arrays dnnz and onnz.
> >
> > Am I missing something?
> >
> > Thanks,
> > Pierre
> >
> > <massif.out.bad><massif.out.better><patch-hypre.txt>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20190104/15f4236f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ex15.c
Type: application/octet-stream
Size: 2893 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20190104/15f4236f/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20190104/15f4236f/attachment-0001.html>
More information about the petsc-dev
mailing list