# PETSC_VIEWER_BINARY_
Creates a `PETSCVIEWERBINARY` `PetscViewer` shared by all processors in a communicator. 
## Synopsis
```
#include "petscviewer.h"   
PetscViewer PETSC_VIEWER_BINARY_(MPI_Comm comm)
```
Collective


## Input Parameter

- ***comm -*** the MPI communicator to share the `PETSCVIEWERBINARY`





## Options Database Keys

- ***-viewer_binary_filename <name> -*** filename in which to store the binary data, defaults to binaryoutput
- ***-viewer_binary_skip_info -*** true means do not create .info file for this viewer
- ***-viewer_binary_skip_options -*** true means do not use the options database for this viewer
- ***-viewer_binary_skip_header -*** true means do not store the usual header information in the binary file
- ***-viewer_binary_mpiio -*** true means use the file via MPI-IO, maybe faster for large files and many MPI ranks



## Environmental variable

- ***PETSC_VIEWER_BINARY_FILENAME -*** filename in which to store the binary data, defaults to binaryoutput



## Note
Unlike almost all other PETSc routines, `PETSC_VIEWER_BINARY_` does not return
an error code.  The binary PetscViewer is usually used in the form
```none
XXXView(XXX object,PETSC_VIEWER_BINARY_(comm));
```


## See Also
 `PETSCVIEWERBINARY`, `PETSC_VIEWER_BINARY_WORLD`, `PETSC_VIEWER_BINARY_SELF`, `PetscViewerBinaryOpen()`, `PetscViewerCreate()`,
`PetscViewerDestroy()`

## Level
intermediate

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

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex28.c.html">src/ksp/ksp/tutorials/ex28.c.html</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)  
