# PetscViewerBinaryGetMPIIOOffset
Gets the current global offset that should be passed to `MPI_File_set_view()` or `MPI_File_{write|read}_at[_all]()` 
## Synopsis
```
#include "petscviewer.h"   
PetscErrorCode PetscViewerBinaryGetMPIIOOffset(PetscViewer viewer, MPI_Offset *off)
```
Not Collective; No Fortran Support


## Input Parameter

- ***viewer -*** PetscViewer context, obtained from `PetscViewerBinaryOpen()`



## Output Parameter

- ***off -*** the current global offset





## Note
Use `PetscViewerBinaryAddMPIIOOffset()` to increase this value after you have written a view.


## See Also
 [](sec_viewers), `PETSCVIEWERBINARY`, `PetscViewerBinaryOpen()`, `PetscViewerBinaryGetInfoPointer()`, `PetscViewerBinaryGetUseMPIIO()`, `PetscViewerBinarySetUseMPIIO()`, `PetscViewerBinaryAddMPIIOOffset()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/viewer/impls/binary/binv.c.html#PetscViewerBinaryGetMPIIOOffset">src/sys/classes/viewer/impls/binary/binv.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/classes/viewer/impls/binary/binv.c)


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