<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Brad:</div><div class="gmail_quote">I updated the help menu</div><div class="gmail_quote"><a href="https://bitbucket.org/petsc/petsc/commits/7526cb21428e6e453a7c940d78502e96d2c8a4bd">https://bitbucket.org/petsc/petsc/commits/7526cb21428e6e453a7c940d78502e96d2c8a4bd</a></div><div class="gmail_quote"><br></div><div class="gmail_quote">Thanks for your report.</div><div class="gmail_quote">Hong</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail-HOEnZb"><div class="gmail-h5"><br>
On 03/27/2017 12:57 PM, Hong wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
Brad:<br>
You must call MatDestroySubMatrices(), not MatDestroyMatrices().<br>
See petsc/src/mat/examples/tests/e<wbr>x54.c<br>
<br>
I'll add it to the help menu of MatCreateSubMatrices().<br>
<br>
Hong<br>
<br>
<br>
<br>
    In PyLith we call MatCreateSubMatrices() and MatDestroyMatrices()<br>
    with potentially different numbers of submatrices on each process.<br>
    If each process has a nonzero number of submatrices things appear to<br>
    be working fine. If a process has zero submatrices, I am getting a<br>
    memory leak on that process (as reported by -malloc_dump). I did not<br>
    get this behavior with PETSc 3.7.2 and earlier with<br>
    MatGetSubMatrices() and MatDestroyMatrices().<br>
<br>
    Do I need to do something special when calling<br>
    MatCreateSubMatrices() or MatDestroyMatrices() when the number of<br>
    submatrices on a process is zero?<br>
<br>
    The log with the petsc log summary and malloc dump output is attached.<br>
<br>
    Thanks,<br>
    Brad<br>
<br>
<br>
<br>
</blockquote>
<br>
</div></div></blockquote></div><br></div></div>