-
Notifications
You must be signed in to change notification settings - Fork 279
Description
Description
I'm running a FluidDynamicsApplication simulation in MPI and I output some results in the HDF5 format using single_mesh_temporal_output_process.
After the simulation is done, I want to visualize the results in Paraview so I use the convertH5toXdmf function within Kratos. Unfortunately, this fails, throwing this error:
RuntimeError: Nodal result variable "_partition" already exists.
After talking with @matekelemen, the issue seems to be that a "_partitions" field gets created in the .h5 file together with other values in ConditionDataValues, ElementDataValues and NodalDataValues. Then, the script convertH5toXdmf gets confused because the data format is not the same (so no value per single node/element/condition).
By going to xdmf_utils.py and manually skipping any data field named "_partitions" the issue is solved. However, it might also be interested to have the partition IDs in the results, so they can be visualized.
Maybe storing the partition ID as a regular DataValue? In other words, for each node/element/condition, we just save the partition ID instead of saving partitions as ranges. In any case, this would need a fix, so convertH5toXdmf works out of the box.
Scope
- FluidDynamicsApplication
- Hdf5Application
To Reproduce
I believe it is enough to run any MPI simulation with a single_mesh_temporal_output_process and and then use convertH5toXdmf.
Expected behavior
The script convertH5toXdmf should work out of the box and convert H5 files generated with the same version of Kratos. Ideally it should include also the partition ID as a regular DataValue.
Environment
- OS: Ubuntu 24.04
- Branch: master