# PetscSFSetUpRanks
Set up data structures associated with ranks; this is for internal use by `PetscSF` implementations. 
## Synopsis
```
#include "petscsf.h" 
PetscErrorCode PetscSFSetUpRanks(PetscSF sf, MPI_Group dgroup)
```
Collective


## Input Parameters

- ***sf -*** `PetscSF` to set up; `PetscSFSetGraph()` must have been called
- ***dgroup -*** `MPI_Group` of ranks to be distinguished (e.g., for self or shared memory exchange)





## See Also
 `PetscSF`, `PetscSFGetRootRanks()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/sf/interface/sf.c.html#PetscSFSetUpRanks">src/vec/is/sf/interface/sf.c</A>


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


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