Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Particle Patches: Do not emplace patch records if they don't exist in the file being read #945

Merged

Conversation

franzpoeschel
Copy link
Contributor

@franzpoeschel franzpoeschel commented Mar 12, 2021

The GenerationPolicy for ParticleSpecies automatically fills the particlePatches container with the numParticles and numParticlesOffset components, meaning that a reading code has no way to know whether those records actually exist. This resulted in the openpmd-pipe tool failing to convert a dataset containing a particle species without patches (with extremely cryptic error messages from somewhere deep in the backend). This PR adds (1) a failing test and (2) a fix.

Copy link
Member

@ax3l ax3l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch and coverage, thank you! 🚀

@ax3l ax3l merged commit 24058e0 into openPMD:dev Mar 17, 2021
@ax3l ax3l self-assigned this Mar 17, 2021
ax3l pushed a commit to ax3l/openPMD-api that referenced this pull request Apr 9, 2021
… the file being read (openPMD#945)

* Removed from PR during backport:
  Test openpmd-pipe on git-sample/data%T.h5

* Only emplace particle patches in container if they exist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants