Mismatch between damaris_set_position() and the dimensions of the variable (layout).
There is an issue with the Damaris runtime when a Damaris XML element <variable> has a <layout> with multiple dimensions (e.g. param_x, 3) and only a single offset is set with damaris_set_position(). Resulting in when the variable blocks get re-organised into a Numpy Array in the Python interface or HDF collective mode file output, the offsets will be incorrect.
The issue stems from the fact that it is easy to modify the layout dimensions in the XML file (e.g., change <layout dimensions="num_x, 3" to <layout dimensions="num_x * 3"), however the offsets that are passed via damaris_set_offset() are typically written in the C/C++/Fortran code and not dynamically changeable.
How to fix this -
- Flag a runtime error.
- Default to single dimension if detected.