# PCGetFailedReasonRank
Gets the reason a `PCSetUp()` failed or `PC_NOERROR` if it did not fail on this MPI rank 
## Synopsis
```
#include "petscksp.h" 
PetscErrorCode PCGetFailedReasonRank(PC pc, PCFailedReason *reason)
```
Not Collective


## Input Parameter

- ***pc -*** the preconditioner context



## Output Parameter

- ***reason -*** the reason it failed



## Note
Different ranks may have different reasons or no reason, see `PCGetFailedReason()`




## See Also
 `PC`, `PCCreate()`, `PCApply()`, `PCDestroy()`, `PCGetFailedReason()`, `PCSetFailedReason()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/interface/precon.c.html#PCGetFailedReasonRank">src/ksp/pc/interface/precon.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ksp/pc/interface/precon.c)


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