# PetscOmpCtrlOmpRegionOnMasterEnd
Mark the end of an OpenMP library call on master ranks 
## Synopsis
```
#include "petscsys.h"  
PetscErrorCode PetscOmpCtrlOmpRegionOnMasterEnd(PetscOmpCtrl ctrl)
```

## Input Parameter

- ***ctrl -*** a PETSc OMP controller



## Note
Only master ranks can call this function. Call `PetscOmpCtrlGetOmpComms()` to know if this is a master rank.
This function restores the CPU binding of master ranks and set and nthreads-var of OpenMP runtime to 1.




## See Also
 `PetscOmpCtrlOmpRegionOnMasterBegin()`, `PetscOmpCtrlCreate()`, `PetscOmpCtrlDestroy()`, `PetscOmpCtrlBarrier()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/utils/mpishm.c.html#PetscOmpCtrlOmpRegionOnMasterEnd">src/sys/utils/mpishm.c</A>


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