:orphan:
# PetscSubcommCreate
Create a `PetscSubcomm` context. This object is used to manage the division of a `MPI_Comm` into subcommunicators 
## Synopsis
```
#include "petscsys.h"    
PetscErrorCode PetscSubcommCreate(MPI_Comm comm, PetscSubcomm *psubcomm)
```
Collective


## Input Parameter

- ***comm -*** MPI communicator



## Output Parameter

- ***psubcomm -*** location to store the `PetscSubcomm` context





## See Also
 `PetscSubcomm`, `PetscSubcommDestroy()`, `PetscSubcommSetTypeGeneral()`, `PetscSubcommSetFromOptions()`, `PetscSubcommSetType()`,
`PetscSubcommSetNumber()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/objects/subcomm.c.html#PetscSubcommCreate">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</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](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
