diff --git a/include/picongpu/plugins/openPMD/writer/ParticleAttribute.hpp b/include/picongpu/plugins/openPMD/writer/ParticleAttribute.hpp index 6435b6e862..5afb6012d6 100644 --- a/include/picongpu/plugins/openPMD/writer/ParticleAttribute.hpp +++ b/include/picongpu/plugins/openPMD/writer/ParticleAttribute.hpp @@ -157,6 +157,12 @@ namespace picongpu } if(elements == 0) { + if(globalElements == 0) + { + // no one does anything, storeChunk() is not allowed since empty components are automatically + // converted to constant components by the openPMD-api, these do not allow storeChunk + return; + } // accumulateWrittenBytes += 0; // Workaround for this bug: https://github.com/openPMD/openPMD-api/pull/1794