Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions include/picongpu/plugins/openPMD/writer/ParticleAttribute.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,20 @@ namespace picongpu
if(elements == 0)
{
// accumulateWrittenBytes += 0;

// Workaround for this bug: https://github.com/openPMD/openPMD-api/pull/1794
// and also this one for good measure https://github.com/openPMD/openPMD-api/pull/1862
// In the affected versions of the openPMD-api, Span-based storeChunk must be
// treated as an MPI-collective call.
for(uint32_t d = 0; d < components; d++)
{
::openPMD::RecordComponent recordComponent
= components > 1 ? record[name_lookup[d]] : record[::openPMD::MeshRecordComponent::SCALAR];

recordComponent.storeChunk<ComponentType>(
::openPMD::Offset{globalOffset},
::openPMD::Extent{elements});
}
return;
}

Expand Down