Memory a rank may claim before a large distributed workspace. More...
#include <algorithm>#include <cstdint>#include <cstdio>#include <filesystem>#include <fstream>#include <limits>#include <optional>#include <sstream>#include <stdexcept>#include <string>Go to the source code of this file.
Namespaces | |
| namespace | gpr |
| Gaussian-process regression, kernels, priors, and the searches that run on the surrogate. | |
| namespace | gpr::linalg |
| Dense and structured linear algebra behind the GP: Cholesky and eigen solvers, linear operators, backend selection. | |
Typedefs | |
| using | gpr::linalg::AvailableMemory = std::optional<std::int64_t> |
Functions | |
| AvailableMemory | gpr::linalg::availableHostBudget () |
| std::int64_t | gpr::linalg::availableHostBytes () |
| constexpr bool | gpr::linalg::fitsRankShare (std::int64_t needed, AvailableMemory available, int node_ranks) noexcept |
| constexpr bool | gpr::linalg::fitsRankShare (std::int64_t needed, std::int64_t available, int node_ranks) noexcept |
| void | gpr::linalg::requireRankShare (const char *what, std::int64_t needed, AvailableMemory available, int node_ranks) |
| void | gpr::linalg::requireRankShare (const char *what, std::int64_t needed, std::int64_t available, int node_ranks) |
Memory a rank may claim before a large distributed workspace.
Linux grants an allocation that exceeds free memory and kills the process (or pages it to swap) only when the pages are touched, so a distributed kernel that allocates past the node's memory does not fail at the allocation: it thrashes or is killed by the OOM handler mid-run. A kernel that is about to claim a large workspace compares it with this rank's share of the memory available on its node and stops with a message naming both before any of it is allocated.
Definition in file MemoryBudget.h.