Skip to content

Commit f95f78a

Browse files
Merge pull request #1473 from PowerGridModel/pgm/feature/document-oom-errors
Docs: add known limitation clause on running out of memory
2 parents 561ccdd + 127b3ac commit f95f78a

3 files changed

Lines changed: 28 additions & 1 deletion

File tree

docs/advanced_documentation/c-api.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,3 +225,15 @@ A writable dataset, instead, cannot be created by the user, but will be provided
225225
The user can then provide buffers to which the deserializer can write its data (and `indptr`).
226226
This allows the buffers to have lifetimes beyond the lifetime of the deserializer.
227227
This dataset type is only meant to be used for providing user buffers to the deserializer.
228+
229+
## Known limitations
230+
231+
The current serialization functionality has some limitations.
232+
233+
### Memory limitations
234+
235+
Hardware limitations and availability of free contiguous memory may result in, e.g., failing buffer allocation.
236+
Often, this will lead to a [`bad_alloc`](https://en.cppreference.com/cpp/memory/new/bad_alloc).
237+
Due to the nature of the issue, we consider this a [non-spurious edge case](./terminology.md#non-spurious-edge-cases).
238+
Wherever possible, the Power Grid Model catches and wraps such low-level exceptions.
239+
Regardlessly, caution is still adviced when handling large datasets.

docs/advanced_documentation/terminology.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,10 @@ Please always double-check that the data is valid before reporting an issue, e.g
221221
Please also check whether your input data is correctly created and contains no obvious errors like sensors that are
222222
marked as measuring a node while, in fact, they are actually measuring branch flow.
223223

224-
Other examples of non-spurious edge cases are cases in which the power grid model reports a `NotObservableError`.
224+
Other examples of non-spurious edge cases are:
225+
226+
* Cases in which the power grid model reports a `NotObservableError`;
227+
* Cases in which a `PowerGridError` is thrown that wraps a `bad_alloc` (running out of available contiguous memory).
225228

226229
#### Spurious edge cases
227230

docs/user_manual/serialization.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,3 +406,15 @@ The type is listed for each attribute in [Components](components.md).
406406

407407
**NOTE:** the special value `nan` represents absence of value and may also be represented by
408408
[`nil`](#msgpack-schema-nil-absence-of-value) in the [msgpack schema](#msgpack-serialization-format-specification).
409+
410+
## Known limitations
411+
412+
The current serialization functionality has some limitations.
413+
414+
### Memory limitations
415+
416+
Hardware limitations and availability of free contiguous memory may result in failing serialization and deserialization.
417+
Often, this will lead to a [`bad_alloc`](https://en.cppreference.com/cpp/memory/new/bad_alloc).
418+
Due to the nature of the issue, we consider this a [non-spurious edge case](./terminology.md#non-spurious-edge-cases).
419+
Wherever possible, the Power Grid Model catches and wraps such low-level exceptions thrown during (de-)serialization.
420+
Regardlessly, caution is still adviced when handling large datasets.

0 commit comments

Comments
 (0)