KSPSolveTranspose and PCFieldSplit
Barry Smith
bsmith at mcs.anl.gov
Tue Sep 26 19:56:00 CDT 2006
On Tue, 26 Sep 2006, Randall Mackie wrote:
> When I try to use KSPSolveTranspose with PCFieldSplit, I get the following
> errors:
>
> [0]PETSC ERROR: PCApplyTranspose() line 483 in src/ksp/pc/interface/precon.c
> [0]PETSC ERROR: No support for this operation for this object type!
> [0]PETSC ERROR: !
> [0]PETSC ERROR: KSPInitialResidual() line 56 in src/ksp/ksp/interface/itres.c
> [0]PETSC ERROR: KSPSolve_BCGS() line 41 in src/ksp/ksp/impls/bcgs/bcgs.c
> [0]PETSC ERROR: KSPSolveTranspose() line 562 in src/ksp/ksp/interface/itfunc.c
>
This is just "lazyness", I hadn't implemented the apply transpose.
I've added it now to PETSc-dev; the problem is it cannot be made into an
easy patch since it involves several nontrivial changes.
>
> So then I thought in my code I would just take the transpose of A and call
> KSPSolve, but then I get the following errors:
>
> [0]PETSC ERROR: MatGetSubMatrix_SeqAIJ() line 1686 in
> src/mat/impls/aij/seq/aij.c
> [0]PETSC ERROR: Nonconforming object sizes!
> [0]PETSC ERROR: Cannot reuse matrix. wrong no of nonzeros!
> [0]PETSC ERROR: MatGetSubMatrices_SeqAIJ() line 1799 in
> src/mat/impls/aij/seq/aij.c
> [0]PETSC ERROR: MatGetSubMatrices() line 4828 in src/mat/interface/matrix.c
> [0]PETSC ERROR: MatGetSubMatrix() line 5438 in src/mat/interface/matrix.c
> [0]PETSC ERROR: PCSetUp_FieldSplit() line 162 in
> src/ksp/pc/impls/fieldsplit/fieldsplit.c
> [0]PETSC ERROR: PCSetUp() line 798 in src/ksp/pc/interface/precon.c
> [0]PETSC ERROR: KSPSetUp() line 234 in src/ksp/ksp/interface/itfunc.c
> [0]PETSC ERROR: KSPSolve() line 334 in src/ksp/ksp/interface/itfunc.c
>
>
I'm guessing you used MAT_SAME_NONZERO_PATTERN? But the transpose won't have
the same nonzero pattern?
BTW: Did you find explicitly forming the transposes and solving worked better
than just using KSPSolveTranspose()?
Barry
> Is there some reason why the PCFIeildSplit is not compatible with
> KSPSolveTranspose?
>
> I'm solving with the following options:
>
>
> -em_ksp_truemonitor \
> -em_ksp_type bcgs \
> -em_pc_type fieldsplit \
> -em_pc_fieldsplit_default \
> -em_pc_fieldsplit_type multiplicative \
> -em_fieldsplit_pc_type bjacobi \
> -em_fieldsplit_sub_pc_type ilu \
> -em_fieldsplit_sub_pc_factor_levels 4 \
> -em_fieldsplit_sub_pc_factor_fill 10 \
>
> Randy
>
>
More information about the petsc-users
mailing list