# 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 on viewer


## 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
 `PETSCVIEWERBINARY`, `PetscViewerFileSetMode()`, `PetscViewerCreate()`, `PetscViewerSetType()`, `PetscViewerBinaryOpen()`,
`PetscViewerBinaryGetUseMPIIO()`

## Level
advanced

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

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/tutorials/ex15.c.html">src/dm/tutorials/ex15.c.html</A><BR>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/viewer/impls/binary/binv.c.html#PetscViewerBinarySetUseMPIIO_Binary">PetscViewerBinarySetUseMPIIO_Binary in src/sys/classes/viewer/impls/binary/binv.c</A><BR>


---
[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)  
