Index range of LP64 ScaLAPACK, PBLAS and BLACS on a descriptor. More...
#include <algorithm>#include <atomic>#include <cstdint>#include <limits>Go to the source code of this file.
Classes | |
| class | gpr::linalg::ScopedLp64IndexLimit |
| Lowers the routing limit for the lifetime of the object (tests only). More... | |
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. | |
Enumerations | |
| enum | gpr::linalg::Lp64DescriptorField : int { gpr::linalg::kDescM = 2 , gpr::linalg::kDescN = 3 , gpr::linalg::kDescMb = 4 , gpr::linalg::kDescNb = 5 , gpr::linalg::kDescRsrc = 6 , gpr::linalg::kDescCsrc = 7 , gpr::linalg::kDescLld = 8 } |
| Offsets of the ScaLAPACK array descriptor fields (DTYPE_ .. LLD_ - 1). More... | |
Functions | |
| constexpr std::int64_t | gpr::linalg::blockCyclicLocalExtent (std::int64_t n, std::int64_t nb, std::int64_t iproc, std::int64_t isrc, std::int64_t nprocs) noexcept |
| constexpr std::int64_t | gpr::linalg::largestLocalEntries (std::int64_t m, std::int64_t n, std::int64_t mb, std::int64_t nb, std::int64_t rsrc, std::int64_t csrc, std::int64_t nprow, std::int64_t npcol) noexcept |
| constexpr std::int64_t | gpr::linalg::largestLocalEntries (const int *desc, int nprow, int npcol) noexcept |
| std::atomic< std::int64_t > & | gpr::linalg::lp64IndexLimitStore () noexcept |
| std::int64_t | gpr::linalg::lp64IndexLimit () noexcept |
| bool | gpr::linalg::exceedsLp64 (const int *desc, int nprow, int npcol) noexcept |
| bool | gpr::linalg::exceedsLp64 (std::int64_t count) noexcept |
| True when an element count or workspace size does not fit LP64 INTEGER. | |
Variables | |
| constexpr std::int64_t | gpr::linalg::kLp64IndexLimit |
| Largest element offset an LP64 ScaLAPACK routine forms without overflow. | |
Index range of LP64 ScaLAPACK, PBLAS and BLACS on a descriptor.
LP64 ScaLAPACK passes every dimension, leading dimension and offset as a 32-bit INTEGER and forms local element offsets such as II + (JJ-1)*LLD in that type. A local array of LLD x LOCc entries is addressable only while LLD * LOCc <= 2^31 - 1; past that the offset wraps and the routine reads or writes outside the array (pdpotf2 faults at n = 100000 on a 2 x 2 grid, where each rank holds 50000 x 50000 = 2.5e9 entries).
The functions here compute the local extents in 64-bit arithmetic from the descriptor alone. The result is the same on every process of the grid, so a decision taken on it is collective without communication. They do not call ScaLAPACK and need no MPI, so the decision is testable on synthetic descriptors without allocating the arrays.
Definition in file Lp64Limits.h.