Skip to main content
`Ctrl`+`K`

# 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 (true|false) - flag for using MPI-IO

## See Also

Viewers: Looking at PETSc Objects, `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

Index of all Viewer routines
Table of Contents for all manual pages
Index of all manual pages