[petsc-users] Recursive field split with MatNest

Colin McAuliffe cjm2176 at columbia.edu
Mon Jan 12 10:23:30 CST 2015


I'd be interested in implementing this, I think I should have some time to
spend on it in a few weeks. I suppose the ISSubset function should
determine which ISs were used to make up a third IS? Can this be done by
having ISSum attach a list of pointers to the constituent ISs to the summed
IS for retrieval by ISSubset?

thanks
Colin

On Mon, Jan 12, 2015 at 1:15 AM, Jed Brown <jed at jedbrown.org> wrote:

> Colin McAuliffe <cjm2176 at columbia.edu> writes:
>
> > Dear all, I have a four field problem with dof structure stored in a DM
> > shell. The matrix is a MatNest. This works fine except for when I try to
> > group fields.
>
> Colin, MatGetSubMatrix_Nest does not implement the case of unions of
> index sets.  The relevant comparison code is in the private function
> MatNestFindIS(), just before the line on which your error message was
> generated.  It's possible to make this function check whether the given
> index set is a union of basic index sets constituting the MatNest.  But
> checking for equality with every subset is not scalable in the number of
> blocks, so we'd need something like an ISSubset() function.
>
> If you just want to get your work done, I recommending not using
> MatNest.  If you want to contribute an interesting feature to PETSc, we
> can offer guidance on the implementation.
>
> > For example the following commands
> >
> > -ksp_type gmres
> >    -pc_type fieldsplit
> >    -pc_fieldsplit_type multiplicative
> >       -pc_fieldsplit_0_fields 0,1
> >           -fieldsplit_0_ksp_type preonly
> >           -fieldsplit_0_pc_type lu
> >        -pc_fieldsplit_1_fields 2,3
> >           -fieldsplit_1_ksp_type preonly
> >           -fieldsplit_1_pc_type ilu
> >
> > results in the following error
> >
> > [0]PETSC ERROR: --------------------- Error Message
> > --------------------------------------------------------------
> > [0]PETSC ERROR: Arguments are incompatible
> > [0]PETSC ERROR: Could not find index set
> > [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html
> for
> > trouble shooting.
> > [0]PETSC ERROR: Petsc Release Version 3.5.2, Sep, 08, 2014
> > [0]PETSC ERROR:
> > /Users/Christina/Desktop/COLIN/Work/feapver83/ver83/parfeap/feap on a
> > gnu-dbg named new-host.home by christina Mon Jan 12 00:36:52 2015
> > [0]PETSC ERROR: Configure options --with-debugging=1
> > --with-shared-libraries=0 --with-mpi-dir=/usr/local
> > --with-parmetis-dir=/usr/local --with-metis-dir=/usr/local
> > --with-hypre-dir=/usr/local --download-suitesparse
> > --with-external-packages-dir=/usr/local
> > [0]PETSC ERROR: #1 MatNestFindIS() line 310 in
> >
> /Users/Christina/Desktop/COLIN/Work/petsc-3.5.2/src/mat/impls/nest/matnest.c
> > [0]PETSC ERROR: #2 MatNestFindSubMat() line 371 in
> >
> /Users/Christina/Desktop/COLIN/Work/petsc-3.5.2/src/mat/impls/nest/matnest.c
> > [0]PETSC ERROR: #3 MatGetSubMatrix_Nest() line 387 in
> >
> /Users/Christina/Desktop/COLIN/Work/petsc-3.5.2/src/mat/impls/nest/matnest.c
> > [0]PETSC ERROR: #4 MatGetSubMatrix() line 7345 in
> >
> /Users/Christina/Desktop/COLIN/Work/petsc-3.5.2/src/mat/interface/matrix.c
> > [0]PETSC ERROR: #5 PCSetUp_FieldSplit() line 559 in
> >
> /Users/Christina/Desktop/COLIN/Work/petsc-3.5.2/src/ksp/pc/impls/fieldsplit/fieldsplit.c
> > [0]PETSC ERROR: #6 PCSetUp() line 902 in
> >
> /Users/Christina/Desktop/COLIN/Work/petsc-3.5.2/src/ksp/pc/interface/precon.c
> > [0]PETSC ERROR: #7 KSPSetUp() line 305 in
> >
> /Users/Christina/Desktop/COLIN/Work/petsc-3.5.2/src/ksp/ksp/interface/itfunc.c
> > [0]PETSC ERROR: #8 KSPSolve() line 417 in
> >
> /Users/Christina/Desktop/COLIN/Work/petsc-3.5.2/src/ksp/ksp/interface/itfunc.c
> >
> > My guess is that petsc is expecting a MatNest corresponding to the outer
> > field groupings instead of individual submatrices. Is it possible to
> > resolve this, preferably from the command line?
> >
> > I should also mention that grouping and recursive field split works fine
> > with the same DM shell and a MATAIJ, however a significant amount of time
> > is spent copying the submatrices and I'd prefer to avoid that.
> >
> > Thanks and all the best,
> > Colin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150112/62ec4e87/attachment-0001.html>


More information about the petsc-users mailing list