[petsc-dev] PCFIELDSPLIT with inner -ksp_reuse_preconditioner
Pierre Jolivet
pierre at joliv.et
Wed Jul 13 07:40:47 CDT 2022
Hello,
A user(*) wants to switch back and forth with the option -fieldsplit_1_ksp_reuse_preconditioner, but it’s generating results that I don’t understand.
In the following example I solve three successive linear systems.
If I run
$ ./ex1111 -pc_type fieldsplit -fieldsplit_pc_type lu -log_view -info -options_view -switch false
-fieldsplit_1_ksp_reuse_preconditioner is always false, and I properly get:
1) convergence in a single iteration every time
2) [0] PCSetUp(): Setting up PC with same nonzero pattern for the last solve
3) MatLUFactorNum 3 in -log_view
Now, if I run
$ ./ex1111 -pc_type fieldsplit -fieldsplit_pc_type lu -log_view -info -options_view -switch true
-fieldsplit_1_ksp_reuse_preconditioner is set to true for the second solve and switched back to false for the last solve.
I (wrongfully, IMHO?) get:
1) convergence in 2 iterations for the last solve (instead of 1?)
2) [0] PCSetUp(): Leaving PC with identical preconditioner since reuse preconditioner is set (which should not be set for the last solve?)
3) MatLUFactorNum 1 (instead of 2?)
4) #PETSc Option Table entries:
-fieldsplit_1_ksp_reuse_preconditioner false (though from -info, cf. point #2 just above, this option value is true?)
Does it make sense or do you agree that something is off?
Thanks,
Pierre
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ex1111.c
Type: application/octet-stream
Size: 1979 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20220713/c4630f6e/attachment.obj>
-------------- next part --------------
(*) https://community.freefem.org/t/supply-petsc-numbering-for-shared-memory-block-matrix/486/18
More information about the petsc-dev
mailing list