# PetscSubcommGetContiguousParent
Gets a communicator that that is a duplicate of the parent but has the ranks reordered by the order they are in the children 
## Synopsis
```
#include "petscsys.h"    
PetscErrorCode PetscSubcommGetContiguousParent(PetscSubcomm scomm, MPI_Comm *pcomm)
```
Collective


## Input Parameter

- ***scomm -*** the `PetscSubcomm`



## Output Parameter

- ***pcomm -*** location to store the parent communicator





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

## Level
intermediate

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


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