# PetscCommGetNewTag
Gets a unique new tag from a PETSc communicator. All processors that share the communicator MUST call this routine EXACTLY the same number of times.  This tag should only be used with the current objects communicator; do NOT use it with any other MPI communicator. 
## Synopsis
```
#include "petscsys.h"   
PetscErrorCode PetscCommGetNewTag(MPI_Comm comm, PetscMPIInt *tag)
```
Collective


## Input Parameter

- ***comm -*** the MPI communicator



## Output Parameter

- ***tag -*** the new tag





## See Also
 `PetscObjectGetNewTag()`, `PetscCommDuplicate()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/objects/tagm.c.html#PetscCommGetNewTag">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)  
