# PetscViewerHDF5OpenGroup
Open the HDF5 group with the name (full path) returned by `PetscViewerHDF5GetGroup()`, and return this group's ID and file ID. If `PetscViewerHDF5GetGroup()` yields NULL, then group ID is file ID. 
## Synopsis
```
#include "petscviewerhdf5.h" 
PetscErrorCode PetscViewerHDF5OpenGroup(PetscViewer viewer, const char path[], hid_t *fileId, hid_t *groupId)
```
Not collective


## Input Parameters

- ***viewer -*** the `PetscViewer` of type `PETSCVIEWERHDF5`
- ***path -*** (Optional) The path relative to the pushed group



## Output Parameters

- ***fileId -*** The HDF5 file ID
- ***groupId -*** The HDF5 group ID



## Note
If path starts with '/', it is taken as an absolute path overriding currently pushed group, else path is relative to the current pushed group.
So NULL or empty path means the current pushed group.

If the viewer is writable, the group is created if it doesn't exist yet.




## See Also
 [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerHDF5Open()`, `PetscViewerHDF5PushGroup()`, `PetscViewerHDF5PopGroup()`, `PetscViewerHDF5GetGroup()`, `PetscViewerHDF5WriteGroup()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/viewer/impls/hdf5/hdf5v.c.html#PetscViewerHDF5OpenGroup">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)  
