openPMD / openPMD/openPMD-api

Reading an incomplete Series fails

Open
#741 3 comments 1 reaction 3 assignees Claimed by @franzpoeschel View on GitHub
affects latest release bug
Dominant language
C++
Stars
161
Forks
59
Avg merge
2d 22h
Merged PRs (30d)
7

Description

**Describe the bug**
I am using WarpX ( https://github.com/ECP-WarpX/WarpX , b4067afbd5f487683d6c0f1e5c8ac835d3373fb6) with openPMD output format (ADIOS2 backend). When I try to read a `Series` from a simulation which is still running or a `Series` from an output folder generated by a crashed simulation, reading fails with this error message:
```
[ADIOS2] Warning: Attribute with name /openPMD has no type in backend.
[ADIOS2] Warning: Attribute with name /openPMD has no type in backend.
terminate called after throwing an instance of 'std::runtime_error'
what(): [ADIOS2] Requested attribute (/openPMD) not found in backend.
Aborted (core dumped)
```
Data can be read only if the last timestep is deleted.

**To Reproduce**
Run a simulation with `WarpX` using openPMD output format and make it stop prematurely (e.g. by killing it). Then read some data with the following instructions:
```
import openpmd_api as io
series = io.Series("diags/sp_bp/simData_%T.bp", io.Access_Type.read_only)
```

**Software Environment**
- version of openPMD-api: 0.12.0 (for writing), 0.11.1 (for reading)
- installed openPMD-api via: from source (for writing), from conda (for reading)
- operating system: Red Hat Enterprise Linux Server release 7.6 (Maipo) for writing (7.7 for reading)
- machine: Summit (OLCF) for writing, Rhea (OLCF) for reading
- name and version of Python implementation: Python 3.8.2
- version of ADIOS2: 2.5.0

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.