Description
Describe the bug
Seen with #952: it should be allowed to load a zero-size extent.
corrupted double-linked list
This should produce an empty shared_ptr / zero-sized array (note that for numpy, only the 0:0
selected axes are set to zero-extent in the returned array).
To Reproduce
... having a hard time to write a reproducer outside of the location linked above..
https://github.com/ax3l/openPMD-api/tree/topic-zeroExtendRead
openPMD-api/src/binding/python/openpmd_api/DaskArray.py
Lines 39 to 46 in f5dc8e2
Python:
import openpmd_api
# ...
data = rc[0:0]
rc.series_flush()
or C++
#include <openPMD/openPMD.hpp>
// ...
Expected behavior
At the moment, this crashes (at least in Python). Instead, it should return a zero-sized variable/array.
Software Environment
- version of openPMD-api: 0.13.2
- installed openPMD-api via: from source
- operating system: Ubuntu 20.04
- machine: local laptop
- name and version of Python implementation: CPython 3.9.2
- version of HDF5: 1.10.6
- version of ADIOS1: N/A
- version of ADIOS2: 2.7.1
- name and version of MPI: N/A
Additional context
Seen with #952: This is used by Dask to "probe" the data set on initial access.