# PetscObjectsListGetGlobalNumbering
computes a global numbering of `PetscObject`s living on subcommunicators of a given communicator. 
## Synopsis
```
#include "petscsys.h"   
PetscErrorCode PetscObjectsListGetGlobalNumbering(MPI_Comm comm, PetscInt len, PetscObject *objlist, PetscInt *count, PetscInt *numbering)
```
Collective.


## Input Parameters

- ***comm    -*** the `MPI_Comm`
- ***len     -*** local length of objlist
- ***objlist -*** a list of PETSc objects living on subcomms of comm and containing this comm rank
(subcomm ordering is assumed to be deadlock-free)



## Output Parameters

- ***count      -*** global number of distinct subcommunicators on objlist (may be > len)
- ***numbering  -*** global numbers of objlist entries (allocated by user)





## Note
This is needed when PETSc is used with certain languages that do garbage collection to manage object life cycles.


## Level
developer

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


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/objects/tagm.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)  
