openPMD / openPMD/openPMD-api

resizeable datasets: problematic if first extent is zero

Open
#1,094 1 comment 0 reactions 0 assignees View on GitHub
affects latest release bug frontend: C++17
Dominant language
C++
Stars
161
Forks
59
Avg merge
2d 22h
Merged PRs (30d)
7

Description

With resizeable datasets, there is a problem to resize them if we first declare them as "zero" size.
```
terminate called after throwing an instance of 'std::runtime_error'
what(): Chunks cannot be written for a constant RecordComponent.
SIGABRT
```

Since handling zero-extent datasets is somewhat special (they need to become constant record components), it might be that we want to guard this in the frontend (throw an error if a resizeable data set is declared with zero extent).

The work-around/proper workflow on the user side is to wait with the declaration until N>1 particles are truly to be written.

seen first by @RevathiJambunathan & me in WarpX back-transformed particle diags .

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.