:orphan:
# KSPPIPEPRCG
Pipelined predict-and-recompute conjugate gradient method. [](sec_pipelineksp) 
## Options Database Key

- ***-ksp_pipeprcg_recompute_w -*** recompute the w_k with Ar_k, default is true





## Notes
This method has only a single non-blocking reduction per iteration, compared to 2 blocking for standard `KSPCG`.
The non-blocking reduction is overlapped by the matrix-vector product and preconditioner application.

MPI configuration may be necessary for reductions to make asynchronous progress, which is important for performance of pipelined methods.
See [](doc_faq_pipelined)


## Contributed by
Tyler Chen, University of Washington, Applied Mathematics Department


## Reference
Tyler Chen and Erin Carson. "Predict-and-recompute conjugate gradient variants." SIAM Journal on Scientific Computing 42.5 (2020): A3084-A3108.


## Acknowledgments
This material is based upon work supported by the National Science Foundation Graduate Research Fellowship Program under Grant No. DGE-1762114.
Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author and do not necessarily
reflect the views of the National Science Foundation.


## See Also
 [](ch_ksp), [](doc_faq_pipelined), [](sec_pipelineksp), `KSPCreate()`, `KSPSetType()`, `KSPCG`, `KSPPIPECG`, `KSPPIPECR`, `KSPGROPPCG`, `KSPPGMRES`, `KSPCG`, `KSPCGUseSingleReduction()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/impls/cg/pipeprcg/pipeprcg.c.html#KSPPIPEPRCG">src/ksp/ksp/impls/cg/pipeprcg/pipeprcg.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ksp/ksp/impls/cg/pipeprcg/pipeprcg.c)


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