# Reading error with VTKHDF file with large number of timesteps

**URL:** https://discourse.paraview.org/t/reading-error-with-vtkhdf-file-with-large-number-of-timesteps/16776
**Category:** ParaView Support
**Created:** [June 5, 2025, 7:29am UTC](https://discourse.paraview.org/t/reading-error-with-vtkhdf-file-with-large-number-of-timesteps/16776 "2025-06-05T07:29:35Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![jfavre](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/b5ac83/32.png) [@jfavre](https://discourse.paraview.org/u/jfavre)
#### Post date: [June 5, 2025, 7:29am UTC](https://discourse.paraview.org/t/reading-error-with-vtkhdf-file-with-large-number-of-timesteps/16776/1 "2025-06-05T07:29:35Z")

</div>

Dear Support  
I have converted a time-series of data with 10641 timesteps, for which I have already created an animation, so I know that I have valid data. I saved the data with the command  
SaveData(‘/capstor/scratch/cscs/jfavre/xxx/xxx.vtkhdf’, proxy=reader, WriteAllTimeSteps=1)  
there was no error shown while saving the data.  
When reading the data back using the new format, all timesteps are good up until timestep 6740, and then, without any error messages, all timesteps show data filled with 0. I have tried reading it with v5.13 and 6.0-RC1  
The data is rather large 114G, so not easy to share. The structure is:

```auto
/ Group
/VTKHDF Group
/VTKHDF/Connectivity Dataset {815616/Inf}
/VTKHDF/NumberOfCells Dataset {10641/Inf}
/VTKHDF/NumberOfConnectivityIds Dataset {10641/Inf}
/VTKHDF/NumberOfPoints Dataset {10641/Inf}
/VTKHDF/Offsets Dataset {203905/Inf}
/VTKHDF/PointData Group
/VTKHDF/PointData/acceleration Dataset {3390222600/Inf, 3}
/VTKHDF/PointData/displacement Dataset {3390222600/Inf, 3}
/VTKHDF/PointData/velocity Dataset {3390222600/Inf, 3}
/VTKHDF/Points Dataset {318600/Inf, 3}
/VTKHDF/Steps Group
/VTKHDF/Steps/CellOffsets Dataset {10641/Inf}
/VTKHDF/Steps/ConnectivityIdOffsets Dataset {10641/Inf}
/VTKHDF/Steps/PartOffsets Dataset {10641/Inf}
/VTKHDF/Steps/PointDataOffsets Group
/VTKHDF/Steps/PointDataOffsets/acceleration Dataset {10641/Inf}
/VTKHDF/Steps/PointDataOffsets/displacement Dataset {10641/Inf}
/VTKHDF/Steps/PointDataOffsets/velocity Dataset {10641/Inf}
/VTKHDF/Steps/PointOffsets Dataset {10641/Inf}
/VTKHDF/Steps/Values Dataset {10641}
/VTKHDF/Types Dataset {203904/Inf}

```

is there some known limitation, with number of timesteps, or size, or whatever?

---

<div class="post-metadata">

### Author: ![Louis\_Gombert](https://discourse.paraview.org/user_avatar/discourse.paraview.org/louis_gombert/32/14576_2.png) [@Louis\_Gombert](https://discourse.paraview.org/u/Louis_Gombert)
#### Post date: [June 6, 2025, 6:45am UTC](https://discourse.paraview.org/t/reading-error-with-vtkhdf-file-with-large-number-of-timesteps/16776/2 "2025-06-06T06:45:21Z")

</div>

> [@jfavre](#):
>
> 6740

Hello Jean, curiously 6740/10641 is nearly equal to 2147483647 (int32 limit)/3390222600… that sounds like we use an int32 for indexing somewhere we should be using an int64

---

<div class="post-metadata">

### Author: ![jfavre](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/b5ac83/32.png) [@jfavre](https://discourse.paraview.org/u/jfavre)
#### Post date: [June 6, 2025, 6:53am UTC](https://discourse.paraview.org/t/reading-error-with-vtkhdf-file-with-large-number-of-timesteps/16776/3 "2025-06-06T06:53:23Z")

</div>

> [@Louis\_Gombert](#):
>
> 3390222600

Good math. Can it be fixed before the 6.0 release?

---

<div class="post-metadata">

### Author: ![Louis\_Gombert](https://discourse.paraview.org/user_avatar/discourse.paraview.org/louis_gombert/32/14576_2.png) [@Louis\_Gombert](https://discourse.paraview.org/u/Louis_Gombert)
#### Post date: [June 6, 2025, 7:08am UTC](https://discourse.paraview.org/t/reading-error-with-vtkhdf-file-with-large-number-of-timesteps/16776/4 "2025-06-06T07:08:19Z")

</div>

Could you please first make sure that:

- `VTK_USE_64BIT_IDS` is turned on for your ParaView build
- All of your offset arrays, including those in the `Steps` group, are in fact int64

---

<div class="post-metadata">

### Author: ![jfavre](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/b5ac83/32.png) [@jfavre](https://discourse.paraview.org/u/jfavre)
#### Post date: [June 6, 2025, 7:11am UTC](https://discourse.paraview.org/t/reading-error-with-vtkhdf-file-with-large-number-of-timesteps/16776/5 "2025-06-06T07:11:01Z")

</div>

grep VTK\_USE\_64BIT\_IDS CMakeCache.txt  
VTK\_USE\_64BIT\_IDS:BOOL=ON  
//ADVANCED property for variable: VTK\_USE\_64BIT\_IDS  
VTK\_USE\_64BIT\_IDS-ADVANCED:INTERNAL=1

---

<div class="post-metadata">

### Author: ![Louis\_Gombert](https://discourse.paraview.org/user_avatar/discourse.paraview.org/louis_gombert/32/14576_2.png) [@Louis\_Gombert](https://discourse.paraview.org/u/Louis_Gombert)
#### Post date: [June 6, 2025, 2:24pm UTC](https://discourse.paraview.org/t/reading-error-with-vtkhdf-file-with-large-number-of-timesteps/16776/6 "2025-06-06T14:24:57Z")

</div>

What is the output of `h5dump -H` on your file?

---

<div class="post-metadata">

### Author: ![jfavre](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/b5ac83/32.png) [@jfavre](https://discourse.paraview.org/u/jfavre)
#### Post date: [June 6, 2025, 2:27pm UTC](https://discourse.paraview.org/t/reading-error-with-vtkhdf-file-with-large-number-of-timesteps/16776/7 "2025-06-06T14:27:15Z")

</div>

HDF5 “/capstor/scratch/cscs/jfavre/Salvus/salvus.vtkhdf” {  
GROUP “/” {  
GROUP “VTKHDF” {  
ATTRIBUTE “Type” {  
DATATYPE H5T\_STRING {  
STRSIZE 16;  
STRPAD H5T\_STR\_NULLTERM;  
CSET H5T\_CSET\_ASCII;  
CTYPE H5T\_C\_S1;  
}  
DATASPACE SCALAR  
}  
ATTRIBUTE “Version” {  
DATATYPE H5T\_STD\_I64LE  
DATASPACE SIMPLE { ( 2 ) / ( 2 ) }  
}  
DATASET “Connectivity” {  
DATATYPE H5T\_STD\_I64LE  
DATASPACE SIMPLE { ( 815616 ) / ( H5S\_UNLIMITED ) }  
}  
DATASET “NumberOfCells” {  
DATATYPE H5T\_STD\_I64LE  
DATASPACE SIMPLE { ( 10641 ) / ( H5S\_UNLIMITED ) }  
}  
DATASET “NumberOfConnectivityIds” {  
DATATYPE H5T\_STD\_I64LE  
DATASPACE SIMPLE { ( 10641 ) / ( H5S\_UNLIMITED ) }  
}  
DATASET “NumberOfPoints” {  
DATATYPE H5T\_STD\_I64LE  
DATASPACE SIMPLE { ( 10641 ) / ( H5S\_UNLIMITED ) }  
}  
DATASET “Offsets” {  
DATATYPE H5T\_STD\_I64LE  
DATASPACE SIMPLE { ( 203905 ) / ( H5S\_UNLIMITED ) }  
}  
GROUP “PointData” {  
DATASET “acceleration” {  
DATATYPE H5T\_IEEE\_F32LE  
DATASPACE SIMPLE { ( 3390222600, 3 ) / ( H5S\_UNLIMITED, 3 ) }  
}  
DATASET “displacement” {  
DATATYPE H5T\_IEEE\_F32LE  
DATASPACE SIMPLE { ( 3390222600, 3 ) / ( H5S\_UNLIMITED, 3 ) }  
}  
DATASET “velocity” {  
DATATYPE H5T\_IEEE\_F32LE  
DATASPACE SIMPLE { ( 3390222600, 3 ) / ( H5S\_UNLIMITED, 3 ) }  
}  
}  
DATASET “Points” {  
DATATYPE H5T\_IEEE\_F32LE  
DATASPACE SIMPLE { ( 318600, 3 ) / ( H5S\_UNLIMITED, 3 ) }  
}  
GROUP “Steps” {  
ATTRIBUTE “NSteps” {  
DATATYPE H5T\_STD\_I64LE  
DATASPACE SCALAR  
}  
DATASET “CellOffsets” {  
DATATYPE H5T\_STD\_I64LE  
DATASPACE SIMPLE { ( 10641 ) / ( H5S\_UNLIMITED ) }  
}  
DATASET “ConnectivityIdOffsets” {  
DATATYPE H5T\_STD\_I64LE  
DATASPACE SIMPLE { ( 10641 ) / ( H5S\_UNLIMITED ) }  
}  
DATASET “PartOffsets” {  
DATATYPE H5T\_STD\_I64LE  
DATASPACE SIMPLE { ( 10641 ) / ( H5S\_UNLIMITED ) }  
}  
GROUP “PointDataOffsets” {  
DATASET “acceleration” {  
DATATYPE H5T\_STD\_I64LE  
DATASPACE SIMPLE { ( 10641 ) / ( H5S\_UNLIMITED ) }  
}  
DATASET “displacement” {  
DATATYPE H5T\_STD\_I64LE  
DATASPACE SIMPLE { ( 10641 ) / ( H5S\_UNLIMITED ) }  
}  
DATASET “velocity” {  
DATATYPE H5T\_STD\_I64LE  
DATASPACE SIMPLE { ( 10641 ) / ( H5S\_UNLIMITED ) }  
}  
}  
DATASET “PointOffsets” {  
DATATYPE H5T\_STD\_I64LE  
DATASPACE SIMPLE { ( 10641 ) / ( H5S\_UNLIMITED ) }  
}  
DATASET “Values” {  
DATATYPE H5T\_IEEE\_F32LE  
DATASPACE SIMPLE { ( 10641 ) / ( 10641 ) }  
}  
}  
DATASET “Types” {  
DATATYPE H5T\_STD\_U8LE  
DATASPACE SIMPLE { ( 203904 ) / ( H5S\_UNLIMITED ) }  
}  
}  
}  
}

---

<div class="post-metadata">

### Author: ![Louis\_Gombert](https://discourse.paraview.org/user_avatar/discourse.paraview.org/louis_gombert/32/14576_2.png) [@Louis\_Gombert](https://discourse.paraview.org/u/Louis_Gombert)
#### Post date: [June 10, 2025, 10:13am UTC](https://discourse.paraview.org/t/reading-error-with-vtkhdf-file-with-large-number-of-timesteps/16776/8 "2025-06-10T10:13:50Z")

</div>

I believe the culprit here is the writer. Could you please test this patch? I converted a bunch of int to long/vtkIdType [https://gitlab.kitware.com/vtk/vtk/-/merge\_requests/12195](https://gitlab.kitware.com/vtk/vtk/-/merge_requests/12195)

---

<div class="post-metadata">

### Author: ![jfavre](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/b5ac83/32.png) [@jfavre](https://discourse.paraview.org/u/jfavre)
#### Post date: [June 10, 2025, 8:06pm UTC](https://discourse.paraview.org/t/reading-error-with-vtkhdf-file-with-large-number-of-timesteps/16776/9 "2025-06-10T20:06:36Z")

</div>

I have tried the patch provided and it solves the issue. Thanks a bunch.

---

<div class="post-metadata">

### Author: ![Louis\_Gombert](https://discourse.paraview.org/user_avatar/discourse.paraview.org/louis_gombert/32/14576_2.png) [@Louis\_Gombert](https://discourse.paraview.org/u/Louis_Gombert)
#### Post date: [June 11, 2025, 6:32am UTC](https://discourse.paraview.org/t/reading-error-with-vtkhdf-file-with-large-number-of-timesteps/16776/10 "2025-06-11T06:32:20Z")

</div>

Neat! I’ll try to get it in ParaView 6.0

---

<div class="post-metadata">

### Author: ![ahernsean](https://discourse.paraview.org/user_avatar/discourse.paraview.org/ahernsean/32/13743_2.png) [@ahernsean](https://discourse.paraview.org/u/ahernsean)
#### Post date: [June 11, 2025, 5:42pm UTC](https://discourse.paraview.org/t/reading-error-with-vtkhdf-file-with-large-number-of-timesteps/16776/11 "2025-06-11T17:42:20Z")

</div>

The first two changes you make, to `getBlockName()` and `vtkHDFWriter::AppendBlocks()`, changed `int` to `unsigned int`. While this change should double the number of block IDs, should these also be changed to `vtkIdType`?

---

<div class="post-metadata">

### Author: ![Louis\_Gombert](https://discourse.paraview.org/user_avatar/discourse.paraview.org/louis_gombert/32/14576_2.png) [@Louis\_Gombert](https://discourse.paraview.org/u/Louis_Gombert)
#### Post date: [June 12, 2025, 7:10am UTC](https://discourse.paraview.org/t/reading-error-with-vtkhdf-file-with-large-number-of-timesteps/16776/12 "2025-06-12T07:10:05Z")

</div>

The number of blocks in a composite data structure will never overflow an int32, you will get issues with the VTK executive way before. I converted to `unsigned int` to match the return type of `vtkPartitionedDataSetCollection::GetNumberOfPartitionedDataSets()` and avoid casts, but this is not the core fix here.
