Skip to content

Commit 6a4f325

Browse files
committed
Workaround for openPMD/openPMD-api#1794
1 parent 81a41f8 commit 6a4f325

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

include/picongpu/plugins/openPMD/writer/ParticleAttribute.hpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,10 @@ namespace picongpu
159159
{
160160
// accumulateWrittenBytes += 0;
161161

162-
// Since Span-based storeChunk needs to interact with the openPMD backend (potentially opening it),
163-
// this cannot be skipped in parallel setups
162+
# if !OPENPMDAPI_VERSION_GE(0, 17, 0)
163+
// Workaround for this bug: https://github.com/openPMD/openPMD-api/pull/1794
164+
// In the affected versions of the openPMD-api, Span-based storeChunk must be
165+
// treated as an MPI-collective call.
164166
for(uint32_t d = 0; d < components; d++)
165167
{
166168
::openPMD::RecordComponent recordComponent
@@ -170,6 +172,7 @@ namespace picongpu
170172
::openPMD::Offset{globalOffset},
171173
::openPMD::Extent{elements});
172174
}
175+
# endif
173176
return;
174177
}
175178

0 commit comments

Comments
 (0)