:orphan:
# PetscViewerHDF5GetCollective
Return flag whether collective MPI-IO transfer mode is used for HDF5 reads and writes.
## Synopsis
```
#include "petscviewerhdf5.h"
PetscErrorCode PetscViewerHDF5GetCollective(PetscViewer viewer, PetscBool *flg)
```
Not Collective
## Input Parameter
- ***viewer -*** the `PETSCVIEWERHDF5` `PetscViewer`
## Output Parameter
- ***flg -*** the flag
## Note
This setting works correctly only since HDF5 1.10.3 and if HDF5 was installed for MPI. For older versions, `PETSC_FALSE` will be always returned.
For more details, see `PetscViewerHDF5SetCollective()`.
## See Also
[](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerHDF5SetCollective()`, `PetscViewerCreate()`, `PetscViewerSetType()`, `PetscViewerHDF5Open()`
## Level
intermediate
## Location
src/sys/classes/viewer/impls/hdf5/hdf5v.c
## Implementations
PetscViewerHDF5GetCollective_HDF5 in src/sys/classes/viewer/impls/hdf5/hdf5v.c
---
[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](/manualpages/index.md)
[Index of all manual pages](/manualpages/singleindex.md)