:orphan:
# PetscViewerBinarySetUseMPIIO
Sets a binary viewer to use MPI-IO for reading/writing. Must be called before `PetscViewerFileSetName()`
## Synopsis
```
#include "petscviewer.h"
PetscErrorCode PetscViewerBinarySetUseMPIIO(PetscViewer viewer, PetscBool use)
```
Logically Collective
## Input Parameters
- ***viewer -*** the `PetscViewer`; must be a `PETSCVIEWERBINARY`
- ***use -*** `PETSC_TRUE` means MPI-IO will be used
## Options Database Key
-viewer_binary_mpiio : Flag for using MPI-IO
## See Also
[](sec_viewers), `PETSCVIEWERBINARY`, `PetscViewerFileSetMode()`, `PetscViewerCreate()`, `PetscViewerSetType()`, `PetscViewerBinaryOpen()`,
`PetscViewerBinaryGetUseMPIIO()`
## Level
advanced
## Location
src/sys/classes/viewer/impls/binary/binv.c
## Examples
src/dm/tutorials/ex15.c
## Implementations
PetscViewerBinarySetUseMPIIO_Binary in src/sys/classes/viewer/impls/binary/binv.c
---
[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](/manualpages/index.md)
[Index of all manual pages](/manualpages/singleindex.md)