<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 29 Dec 2018, at 10:13 AM, Stefano Zampini <<a href="mailto:stefano.zampini@gmail.com" class="">stefano.zampini@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="auto" class="">Barry,<div dir="auto" class=""><br class=""></div><div dir="auto" class="">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. </div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Stefano</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="">Il giorno Sab 22 Dic 2018, 06:30 Smith, Barry F. <<a href="mailto:bsmith@mcs.anl.gov" class="">bsmith@mcs.anl.gov</a>> ha scritto:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br class="">
   Stefeno,<br class="">
<br class="">
    Doe this look right to you?<br class="">
<br class="">
    Thanks<br class="">
<br class="">
    Barry<br class="">
<br class="">
<br class="">
> On Dec 17, 2018, at 3:18 AM, Pierre Jolivet via petsc-dev <<a href="mailto:petsc-dev@mcs.anl.gov" target="_blank" rel="noreferrer" class="">petsc-dev@mcs.anl.gov</a>> wrote:<br class="">
> <br class="">
> Hello,<br class="">
> I am not sure the hypre routines are called in the right order in MatHYPRESetPreallocation.<br class="">
> 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.<br class="">
> 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).<br class="">
> 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.<br class="">
> <br class="">
> Am I missing something?<br class="">
> <br class="">
> Thanks,<br class="">
> Pierre<br class="">
> <br class="">
> <massif.out.bad><massif.out.better><patch-hypre.txt><br class="">
<br class="">
</blockquote></div>
</div></blockquote></div><br class=""></div></body></html>