Skip to content

Particle Patches: Fallback #8

Open
@ax3l

Description

Hi @KseniaBastrakova,

just a minor issue discovered by @NeilZaim: "particle patches" are an optional feature in openPMD:

SCALAR = openpmd_api.Mesh_Record_Component.SCALAR
num_particles = particle_species.particle_patches["numParticles"][SCALAR].load()
series_hdf.flush()

Although PIConGPU always writes them, these patches might not exist in other data sets such as the examples here:
https://github.com/openPMD/openPMD-example-datasets/
This currently leads to a segfault when using the scripts with those examples.

Can we please add the following simple fallback logic? If particle species does not declare particle patches, just chunk the particle read by a fixed number of particles, e.g. 1e7 particles at a time.

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions