I am having trouble setting the preconditioner options for a mixed element problem inside of FenicsX. To give context, I’m trying to set up a fieldsplit preconditioner in order to precondition a saddle point problem. Unfortunately, when I set the options for the preconditioner, it for whatever reason ignored what I just put in and resorts to the default settings. Here’s a snippet of my code:
The output is as follows:
“KSP Object: (nls_solve_) 1 MPI process
type: preonly
maximum iterations=10000, initial guess is zero
tolerances: relative=1e-05, absolute=1e-50, divergence=10000.
left preconditioning
using DEFAULT norm type for convergence test
PC Object: (nls_solve_) 1 MPI process
type: lu
PC has not been set up so information may be incomplete
out-of-place factorization
tolerance for zero pivot 2.22045e-14
PC Object: (nls_solve_) 1 MPI process
type: lu
PC has not been set up so information may be incomplete
out-of-place factorization
tolerance for zero pivot 2.22045e-14”
If I print out tsp and pc before I set the options, it correctly identifies fgmres and the fieldsplit, but after I set the preconditioning options it just uses the default settings. I appreciate any help with debugging this issue. Thank you!
KSP Object: (ksp_) 1 MPI process
type: fgmres
restart=30, using Classical (unmodified) Gram-Schmidt Orthogonalization with no iterative refinement
happy breakdown tolerance 1e-30
maximum iterations=10000, initial guess is zero
tolerances: relative=1e-05, absolute=1e-50, divergence=10000.
left preconditioning
using DEFAULT norm type for convergence test
PC Object: (ksp_) 1 MPI process
type: fieldsplit
PC has not been set up so information may be incomplete
FieldSplit with Schur preconditioner, factorization FULL
Split info:
KSP solver for A00 block
not yet available
KSP solver for S = A11 - A10 inv(A00) A01
not yet available
PC Object: (ksp_) 1 MPI process
type: fieldsplit
PC has not been set up so information may be incomplete
FieldSplit with Schur preconditioner, factorization FULL
Split info:
KSP solver for A00 block
not yet available
KSP solver for S = A11 - A10 inv(A00) A01
not yet available
WARNING! There are options you set that were not used!
WARNING! could be spelling mistake, etc!
There are 6 unused database options. They are:
Option left: name:-ksp_fieldsplit_press_ksp_rtol value: 1e-10 source: code
Option left: name:-ksp_fieldsplit_press_ksp_type value: cg source: code
Option left: name:-ksp_fieldsplit_press_pc_type value: none source: code
Option left: name:-ksp_fieldsplit_vel_ksp_rtol value: 1e-10 source: code
Option left: name:-ksp_fieldsplit_vel_ksp_type value: preonly source: code
Option left: name:-ksp_fieldsplit_vel_pc_type value: jacobi source: code
I am not quite sure why PETSc doesn’t like the original options name.
You could add an issue to DOLFINx, if you can make a reproducible example.