# PETSC_VIEWER_HDF5_
Creates an `PETSCVIEWERHDF5` `PetscViewer` shared by all processors in a communicator. 
## Synopsis
```
#include "petscviewerhdf5.h" 
PetscViewer PETSC_VIEWER_HDF5_(MPI_Comm comm)
```
Collective


## Input Parameter

- ***comm -*** the MPI communicator to share the HDF5 `PetscViewer`





## Options Database Key

- ***-viewer_hdf5_filename <name> -*** name of the HDF5 file



## Environmental variable

- ***`PETSC_VIEWER_HDF5_FILENAME` -*** name of the HDF5 file



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


## See Also
 `PETSCVIEWERHDF5`, `PetscViewerHDF5Open()`, `PetscViewerCreate()`, `PetscViewerDestroy()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/viewer/impls/hdf5/hdf5v.c.html#PETSC_VIEWER_HDF5_">src/sys/classes/viewer/impls/hdf5/hdf5v.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/classes/viewer/impls/hdf5/hdf5v.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)  
