# DMMonitorCancel
Clears all the monitor functions for a `DM` object. 
## Synopsis
```
#include "petscdm.h"          
#include "petscdmlabel.h"     
#include "petscds.h"     
PetscErrorCode DMMonitorCancel(DM dm)
```
Logically Collective on dm


## Input Parameter

- ***dm -*** the DM



## Options Database Key

- ***-dm_monitor_cancel -*** cancels all monitors that have been hardwired
into a code by calls to `DMonitorSet()`, but does not cancel those
set via the options database



## Note
There is no way to clear one specific monitor from a `DM` object.




## See Also
 `DMMonitorSet()`, `DMMonitorSetFromOptions()`, `DMMonitor()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/interface/dm.c.html#DMMonitorCancel">src/dm/interface/dm.c</A>


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


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