File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
include/picongpu/plugins/openPMD/writer Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 3434# include < pmacc/traits/GetNComponents.hpp>
3535# include < pmacc/traits/Resolve.hpp>
3636
37+ # include < algorithm>
38+
3739namespace picongpu
3840{
3941 namespace openPMD
@@ -167,6 +169,15 @@ namespace picongpu
167169 ::openPMD::RecordComponent recordComponent
168170 = components > 1 ? record[name_lookup[d]] : record[::openPMD::MeshRecordComponent::SCALAR];
169171
172+ /*
173+ * storeChunk() on constant components (this includes empty datasets) are illegal, so skip in
174+ * that case.
175+ */
176+ if (std::ranges::any_of (recordComponent.getExtent (), [](auto const e) { return e == 0 ; }))
177+ {
178+ continue ;
179+ }
180+
170181 recordComponent.storeChunk <ComponentType>(
171182 ::openPMD::Offset{globalOffset},
172183 ::openPMD::Extent{elements});
You can’t perform that action at this time.
0 commit comments