:orphan:
# KSPPIPECG2
Pipelined conjugate gradient method with a single non-blocking reduction per two iterations. [](sec_pipelineksp) 


## Notes
This method has only a single non-blocking reduction per two iterations, compared to 2 blocking for standard CG.  The
non-blocking reduction is overlapped by two matrix-vector products and two preconditioner applications.

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
Manasi Tiwari, Computational and Data Sciences, Indian Institute of Science, Bangalore


## Reference
Manasi Tiwari and Sathish Vadhiyar, "Pipelined Conjugate Gradient Methods for Distributed Memory Systems",
Submitted to International Conference on High Performance Computing, Data and Analytics 2020.


## Developer Note
The implementation code contains a good amount of hand tuned fusion of multiple inner products and similar computations on multiple vectors


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

## Level
intermediate

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


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ksp/ksp/impls/cg/pipecg2/pipecg2.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)  
