# DMDASetNumProcs
Sets the number of processes in each dimension 
## Synopsis
```
#include "petscdmda.h"   
PetscErrorCode DMDASetNumProcs(DM da, PetscInt m, PetscInt n, PetscInt p)
```
Logically Collective on da


## Input Parameters

- ***da -*** the `DMDA`
- ***m -*** the number of X procs (or `PETSC_DECIDE`)
- ***n -*** the number of Y procs (or `PETSC_DECIDE`)
- ***p -*** the number of Z procs (or `PETSC_DECIDE`)





## See Also
 `DM`, `DMDA`, `DMDASetSizes()`, `PetscSplitOwnership()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/da/da.c.html#DMDASetNumProcs">src/dm/impls/da/da.c</A>


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


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