<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jan 20, 2017 at 11:55 AM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> On Jan 20, 2017, at 11:49 AM, Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> wrote:<br>
><br>
> On Fri, Jan 20, 2017 at 10:49 AM, Hong <<a href="mailto:hzhang@mcs.anl.gov">hzhang@mcs.anl.gov</a>> wrote:<br>
> Matt,<br>
> By default, the flag C->submat_singleis = false.<br>
> In PCSetUp_ASM(), we set it as 'true' to use MatGetSubMatrices_MPIAIJ_<wbr>SingleIS().<br>
><br>
> Can you check the value of this flag in your case?<br>
><br>
> The problem is the following:<br>
><br>
>   1) We use MatGetSubMatrices() to extract small matrices in order to form a preconditioner<br>
><br>
>   2) We do this at each Newton iteration<br>
><br>
>   3) We use ASM as a preconditioner for the eventual Newton solve<br>
><br>
>   4) The second time we call MatGetSubMatrices(), it has this flag set, even though we are using multiple ISes<br>
><br>
> Solution: ALSO check that the user is in fact passing a single IS.<br>
><br>
</span>    This requires a communication. I am confused, is the number of IS changing each time? If not why is the flag set?</blockquote><div><br></div><div>ASM sets this flag because it knows that IT is going to call MatGetSubMatrices() later, but it unsafe if any user calls</div><div>MatGetSubMatrices() as well. I think overall its a fragile design and should be scrapped.</div><div><br></div><div>  Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888"><br>
   Barry<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
>   Matt<br>
><br>
> Hong<br>
><br>
> It comes from here:<br>
><br>
>   <a href="https://bitbucket.org/petsc/petsc/commits/c10200c1442b553b7ad65c70101560db4fa22e78" rel="noreferrer" target="_blank">https://bitbucket.org/petsc/<wbr>petsc/commits/<wbr>c10200c1442b553b7ad65c70101560<wbr>db4fa22e78</a><br>
><br>
> If we ask for more than 1 matrix, it dispatches to<br>
><br>
>   MatGetSubMatrices_MPIAIJ_<wbr>SingleIS()<br>
><br>
> but then fails here<br>
><br>
>   <a href="https://bitbucket.org/petsc/petsc/annotate/2e559809f9aee9c95ee79eb0939630cfe5502c8d/src/mat/impls/aij/mpi/mpiov.c?at=master&fileviewer=file-view-default#mpiov.c-1306" rel="noreferrer" target="_blank">https://bitbucket.org/petsc/<wbr>petsc/annotate/<wbr>2e559809f9aee9c95ee79eb0939630<wbr>cfe5502c8d/src/mat/impls/aij/<wbr>mpi/mpiov.c?at=master&<wbr>fileviewer=file-view-default#<wbr>mpiov.c-1306</a><br>
><br>
> because ismax > 1. I think the ismax check needs to move up to here<br>
><br>
>   <a href="https://bitbucket.org/petsc/petsc/annotate/2e559809f9aee9c95ee79eb0939630cfe5502c8d/src/mat/impls/aij/mpi/mpiov.c?at=master&fileviewer=file-view-default#mpiov.c-2012" rel="noreferrer" target="_blank">https://bitbucket.org/petsc/<wbr>petsc/annotate/<wbr>2e559809f9aee9c95ee79eb0939630<wbr>cfe5502c8d/src/mat/impls/aij/<wbr>mpi/mpiov.c?at=master&<wbr>fileviewer=file-view-default#<wbr>mpiov.c-2012</a><br>
><br>
> but I don't know for sure. Please fix this since it is breaking PyLith.<br>
><br>
>   Matt<br>
><br>
> --<br>
> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
> -- Norbert Wiener<br>
><br>
><br>
><br>
><br>
><br>
> --<br>
> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
> -- Norbert Wiener<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div>