# KSPGMRESMonitorKrylov
Calls `VecView()` for each new direction in the `KSPGMRES` accumulated Krylov space. 
## Synopsis
```
#include "petscksp.h"  
PetscErrorCode KSPGMRESMonitorKrylov(KSP ksp, PetscInt its, PetscReal fgnorm, void *dummy)
```
Collective


## Input Parameters

- ***ksp -*** the `KSP` context
- ***its -*** iteration number
- ***fgnorm -*** 2-norm of residual (or gradient)
- ***dummy -*** an collection of viewers created with `KSPViewerCreate()`



## Options Database Key

- ***-ksp_gmres_krylov_monitor <bool> -*** Plot the Krylov directions





## Note
A new `PETSCVIEWERDRAW` is created for each Krylov vector so they can all be simultaneously viewed


## See Also
 [](chapter_ksp), `KSPGMRES`, `KSPMonitorSet()`, `KSPMonitorResidual()`, `VecView()`, `KSPViewersCreate()`, `KSPViewersDestroy()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/impls/gmres/gmres.c.html#KSPGMRESMonitorKrylov">src/ksp/ksp/impls/gmres/gmres.c</A>


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


[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)  
