# VTKHDF PartitionedDataSetCollection (PDC) file not working in Paraview

**URL:** https://discourse.vtk.org/t/vtkhdf-partitioneddatasetcollection-pdc-file-not-working-in-paraview/14553
**Category:** Support
**Tags:** file-formats
**Created:** [September 10, 2024, 11:28am UTC](https://discourse.vtk.org/t/vtkhdf-partitioneddatasetcollection-pdc-file-not-working-in-paraview/14553 "2024-09-10T11:28:12Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![jpmorr](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jpmorr/32/8944_2.png) [@jpmorr](https://discourse.vtk.org/u/jpmorr)
#### Post date: [September 10, 2024, 11:28am UTC](https://discourse.vtk.org/t/vtkhdf-partitioneddatasetcollection-pdc-file-not-working-in-paraview/14553/1 "2024-09-10T11:28:12Z")

</div>

I’m trying to create a `VTKHDF` file that has multiple blocks in it but I’ve not managed to do so yet. My initial question was [here](https://discourse.vtk.org/t/vtkmultiblockdataset-equivalent-for-vtkhdf-files/14369) where I was pointed towards the documentation and given a working example file. Rather than re-opening that discussion I’m creating this as a new troubleshooting thread.

I’ve been testing things this morning but despite following the structure in the provided example from that thread, I cannot get my version to load in Paraview.

Here’s the example file that works:  
[test\_composite.hdf](https://discourse.vtk.org/uploads/short-url/nYXOSl4dALeKJq2iRQRxJSHdKw1.hdf) (27.1 KB)

and here’s my test case with 4 random `PolyData` blocks:  
[hdf\_multiblock\_test.vtkhdf](https://discourse.vtk.org/uploads/short-url/rntY6281U5cpk5lmBRmtHTibrkL.vtkhdf) (2.4 MB)

When I try to open my version Paraview just immediately crashes without displaying any warnings, just closes. I can’t see anything immediately wrong like the missing `Index` that I previously had so I guess I must be doing something else incorrect.

I’m using Paraview 5.13 which I just installed last week and seems to be ok for everything else. I’m writing my files from a `python` code using `h5py`. Normal `VTKHDF` files written with `h5py` are displayed without issue.

---

<div class="post-metadata">

### Author: ![lgivord](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lgivord/32/3543_2.png) [@lgivord](https://discourse.vtk.org/u/lgivord)
#### Post date: [September 10, 2024, 2:38pm UTC](https://discourse.vtk.org/t/vtkhdf-partitioneddatasetcollection-pdc-file-not-working-in-paraview/14553/2 "2024-09-10T14:38:33Z")

</div>

Hello @jpmorr,

thanks for opening another thread, your data is almost correct you miss one last thing: the link creation order.

From the documentation : [VTK File Formats - VTK documentation](https://docs.vtk.org/en/latest/design_documents/VTKFileFormats.html#partitioneddatasetcollection-and-multiblockdataset)

> The Assembly group and its children need to track creation order to be able to keep subtrees ordered. For this, you need to set H5G properties `H5P_CRT_ORDER_TRACKED` and `H5P_CRT_ORDER_INDEXED` on each group when writing the Assembly.

if you check your data you’ll see that you miss for `VTKHDF`, `Assembly` and `Assembly`’s subgroups this tag:

 ![image](https://discourse.vtk.org/uploads/default/original/2X/9/935a6ac9fece3acc4722e35b660ff8fa08dc0396.png)

With h5py, when creating a new group you can enforce this tag like this:

```py
import h5py as h5

f = h5.File('your_data.vtkhdf', 'w')

# VTKHDF, Assembly need to be tagged with the track_order
root = f.create_group('VTKHDF', track_order=True)
assembly = root.create_group('Assembly', track_order=True)

```

---

<div class="post-metadata">

### Author: ![jpmorr](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jpmorr/32/8944_2.png) [@jpmorr](https://discourse.vtk.org/u/jpmorr)
#### Post date: [September 10, 2024, 2:47pm UTC](https://discourse.vtk.org/t/vtkhdf-partitioneddatasetcollection-pdc-file-not-working-in-paraview/14553/3 "2024-09-10T14:47:08Z")

</div>

@lgivord Thanks for checking this. I thought it might be something like that but I’m now a little confused. In the test file that works, the creation order is not tracked, as you can see from the screenshot below.

 ![image](https://discourse.vtk.org/uploads/default/original/2X/4/44c3d8697192e621c2c953dbab7766d0932c1a61.png)

I’m going to try re-writing my files with the creation order tracked (will report back shortly). In this case, I presume the `Index` needs to match the creation order?

---

<div class="post-metadata">

### Author: ![jpmorr](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jpmorr/32/8944_2.png) [@jpmorr](https://discourse.vtk.org/u/jpmorr)
#### Post date: [September 10, 2024, 2:58pm UTC](https://discourse.vtk.org/t/vtkhdf-partitioneddatasetcollection-pdc-file-not-working-in-paraview/14553/4 "2024-09-10T14:58:36Z")

</div>

@lgivord Thanks for solving this.

My main problem was that I was not tracking the order for the root as in your code:  
`root = f.create_group('VTKHDF', track_order=True)` but I was also attempting to track creation order for the block data which may have been the cause.

I also see the difference between `Attribute` creation order and `Link` creation order now.

Everything seems to be working well now.

---

<div class="post-metadata">

### Author: ![lars](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lars/32/8912_2.png) [@lars](https://discourse.vtk.org/u/lars)
#### Post date: [June 11, 2025, 1:13pm UTC](https://discourse.vtk.org/t/vtkhdf-partitioneddatasetcollection-pdc-file-not-working-in-paraview/14553/5 "2025-06-11T13:13:46Z")

</div>

Hi everybody,

Sorry for somehow re-opening this topic, but I would like to drop a comment here: I am currently implementing a writer for the .vtkhdf file-format in C++. The [documentation](https://docs.vtk.org/en/latest/design_documents/VTKFileFormats.html#partitioneddatasetcollection-and-multiblockdataset) of the composite data sets states the following:

> The Assembly group and its children need to track creation order to be able to keep subtrees ordered. For this, you need to set H5G properties `H5P_CRT_ORDER_TRACKED` and `H5P_CRT_ORDER_INDEXED` on each group when writing the Assembly.

It **doesn’t** state that the VTKHDF root-group itself also requires these properties. For an experienced VTK/HDF5 developer this might have been clear, but it was not obvious to me.

I suggest to adapt the documentation accordingly.

And by the way: Now that I’ve stumbled over this topic, I passed the respective properties to the root group and guess what: Reading the composite data set in ParaView worked like a charm… 😀

---

<div class="post-metadata">

### Author: ![lgivord](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lgivord/32/3543_2.png) [@lgivord](https://discourse.vtk.org/u/lgivord)
#### Post date: [June 11, 2025, 1:33pm UTC](https://discourse.vtk.org/t/vtkhdf-partitioneddatasetcollection-pdc-file-not-working-in-paraview/14553/6 "2025-06-11T13:33:42Z")

</div>

yes indeed I open an issue about it here : [https://gitlab.kitware.com/vtk/vtk/-/issues/19702](https://gitlab.kitware.com/vtk/vtk/-/issues/19702)
