Skip to content
Draft
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
15 changes: 15 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,21 @@ namespace picongpu
if(elements == 0)
{
// accumulateWrittenBytes += 0;

# if !OPENPMDAPI_VERSION_GE(0, 17, 0)
// Workaround for this bug: https://github.com/openPMD/openPMD-api/pull/1794
// 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});
}
# endif
return;
}

Expand Down