# PetscSubcommSetNumber
Set total number of subcommunicators desired in the given `PetscSubcomm` 
## Synopsis
```
#include "petscsys.h"    
PetscErrorCode PetscSubcommSetNumber(PetscSubcomm psubcomm, PetscInt nsubcomm)
```
Collective


## Input Parameters

- ***psubcomm -*** `PetscSubcomm` context
- ***nsubcomm -*** the total number of subcommunicators in psubcomm





## See Also
 `PetscSubcomm`, `PetscSubcommCreate()`, `PetscSubcommDestroy()`, `PetscSubcommSetType()`, `PetscSubcommSetTypeGeneral()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/objects/subcomm.c.html#PetscSubcommSetNumber">src/sys/objects/subcomm.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex73.c.html">src/ksp/ksp/tutorials/ex73.c.html</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/objects/subcomm.c)


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