Skip to content

Commit dfc8cea

Browse files
committed
Fix the documentation
1 parent 8338593 commit dfc8cea

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

docs/source/details/mpi.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Functionality Behavior Description
3030
``::resetDataset`` [1]_ [2]_ *backend-specific* declare, write
3131
``::makeConstant`` [3]_ *backend-specific* declare, write
3232
``::storeChunk`` [1]_ independent write
33+
``::storeChunk`` [5]_ collective Span-based overloads
3334
``::loadChunk`` independent read
3435
``::availableChunks`` [4]_ collective read, immediate result
3536
============================ ================== ================================
@@ -49,6 +50,8 @@ Functionality Behavior Description
4950
.. [4] We usually open iterations delayed on first access. This first access is usually the ``flush()`` call after a ``storeChunk``/``loadChunk`` operation. If the first access is non-collective, an explicit, collective ``Iteration::open()`` can be used to have the files already open.
5051
Alternatively, iterations might be accessed for the first time by immediate operations such as ``::availableChunks()``.
5152
53+
.. [5] The Span-based ``storeChunk`` API calls return a backend-allocated pointer, requiring flush operations. These API calls hence inherit the collective properties of flushing. Use store calls with zero-size extent if a rank does not contribute anything.
54+
5255
.. warning::
5356

5457
The openPMD-api will by default flush only those Iterations which are dirty, i.e. have been written to.

include/openPMD/RecordComponent.hpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,11 @@ class RecordComponent : public BaseRecordComponent
417417
* @brief Overload of storeChunk() that lets the openPMD API allocate
418418
* a buffer.
419419
*
420+
* Collective call: Unlike most other storeChunk() calls, this call returns
421+
* pointers allocated by the IO backends and hence inherits the collective
422+
* properties of flushing. Apply zero-extent storeChunk() calls from ranks
423+
* that do not contribute anything.
424+
*
420425
* This may save memory if the openPMD backend in use is able to provide
421426
* users a view into its own buffers, avoiding the need to allocate
422427
* a new buffer.
@@ -453,6 +458,11 @@ class RecordComponent : public BaseRecordComponent
453458
/**
454459
* Overload of span-based storeChunk() that uses operator new() to create
455460
* a buffer.
461+
*
462+
* Collective call: Unlike most other storeChunk() calls, this call returns
463+
* pointers allocated by the IO backends and hence inherits the collective
464+
* properties of flushing. Apply zero-extent storeChunk() calls from ranks
465+
* that do not contribute anything.
456466
*/
457467
template <typename T>
458468
DynamicMemoryView<T> storeChunk(Offset, Extent);

0 commit comments

Comments
 (0)