# PetscViewerHDF5ReadSizes
Read block size and global size of a `Vec` or `IS` stored in an HDF5 file. 
## Synopsis
```
#include "petsclayoutdf5.h"   
#include "petscis.h"   
PetscErrorCode PetscViewerHDF5ReadSizes(PetscViewer viewer, const char name[], PetscInt *bs, PetscInt *N)
```

## Input Parameters

- ***viewer -*** The HDF5 viewer
- ***name   -*** The dataset name



## Output Parameters

- ***bs     -*** block size
- ***N      -*** global size





## Notes
The dataset is stored as an HDF5 dataspace with 1-4 dimensions in the order
1) # timesteps (optional), 2) # blocks, 3) # elements per block (optional), 4) real and imaginary part (only for complex).

The dataset can be stored as a 2D dataspace even if its blocksize is 1; see `PetscViewerHDF5SetBaseDimension2()`.


## See Also
 `PetscViewer`, `PETSCVIEWERHDF5`, `PetscViewerHDF5Open()`, `VecLoad()`, `ISLoad()`, `VecGetSize()`, `ISGetSize()`, `PetscViewerHDF5SetBaseDimension2()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/utils/hdf5io.c.html#PetscViewerHDF5ReadSizes">src/vec/is/utils/hdf5io.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/is/utils/hdf5io.c)


[Index of all IS routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
