From ae7cfa91ca2ceed7401e3b50af5b75067c7e5e96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Wed, 1 Apr 2026 16:40:24 +0200 Subject: [PATCH] Do not call storeChunk upon empty particle species --- .../picongpu/plugins/openPMD/writer/ParticleAttribute.hpp | 6 ++++++ 1 file changed, 6 insertions(+) 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