[petsc-dev] Bug introduced in MatGetSubmatrices()
Hong
hzhang at mcs.anl.gov
Fri Jan 20 10:43:53 CST 2017
Matt:
On mastter, we have
if (C->submat_singleis) {
/* flag is set in PCSetUp_ASM() to skip several MPIU_Allreduce() */
MatGetSubMatrices_MPIAIJ_SingleIS(C,ismax,isrow,iscol,scall,submat);
PetscFunctionReturn(0);
}
...
MatGetSubMatrices_MPIAIJ_Local(C,...)
i.e., MatGetSubMatrices_MPIAIJ_SingleIS() is called when ismax=1 for each
process.
General case is handled by MatGetSubMatrices_MPIAIJ_Local(C,...)
I've optimized this routine and will merge it to master.
Hong
It comes from here:
>
> https://bitbucket.org/petsc/petsc/commits/c10200c1442b553b7ad65c70101560
> db4fa22e78
>
> If we ask for more than 1 matrix, it dispatches to
>
> MatGetSubMatrices_MPIAIJ_SingleIS()
>
> but then fails here
>
> https://bitbucket.org/petsc/petsc/annotate/
> 2e559809f9aee9c95ee79eb0939630cfe5502c8d/src/mat/impls/aij/
> mpi/mpiov.c?at=master&fileviewer=file-view-default#mpiov.c-1306
>
> because ismax > 1. I think the ismax check needs to move up to here
>
> https://bitbucket.org/petsc/petsc/annotate/
> 2e559809f9aee9c95ee79eb0939630cfe5502c8d/src/mat/impls/aij/
> mpi/mpiov.c?at=master&fileviewer=file-view-default#mpiov.c-2012
>
> but I don't know for sure. Please fix this since it is breaking PyLith.
>
> Matt
>
> --
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20170120/3b8399fe/attachment.html>
More information about the petsc-dev
mailing list