# KSP_DIVERGED_INDEFINITE_PC
It appears the preconditioner is indefinite (has both positive and negative eigenvalues) and this Krylov method (`KSPCG`) requires it to be positive definite 


## Note
This can happen with the `PCICC` preconditioner, use -pc_factor_shift_positive_definite to force
the `PCICC` preconditioner to generate a positive definite preconditioner


## See Also
 `KSPSolve()`, `KSPGetConvergedReason()`, `KSPConvergedReason`, `KSPSetTolerances()`


## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/include/petscksp.h.html#KSP_DIVERGED_INDEFINITE_PC">include/petscksp.h</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/tutorials/ex1.c.html">src/ksp/pc/tutorials/ex1.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/tutorials/ex2.c.html">src/ksp/pc/tutorials/ex2.c.html</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petscksp.h)


[Index of all KSP routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
