MPI-aware dispatcher for the Hutchinson-style probe loop used by the Laplace Hessian assembler and the Williams-Rasmussen polarisation-curvature estimator. More...
Go to the source code of this file.
Classes | |
| class | gpr::linalg::ProbeExecutor |
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. | |
MPI-aware dispatcher for the Hutchinson-style probe loop used by the Laplace Hessian assembler and the Williams-Rasmussen polarisation-curvature estimator.
Two-axis dispatch driven by gpr::linalg::KernelInverse::Kind:
Kind::RankLocal: each probe runs on exactly one rank, partitioned round-robin (idx % nprocs == rank). Ranks fill 0.0 in their own local result vector for probes they did not own. A single MPI_Allreduce(MPI_SUM) at the end reconstitutes the global vector on every rank. Ideal for backends whose solve / solve_mat is entirely rank-local.Kind::Distributed: every rank runs every probe. The operator's solve / solve_mat is itself an MPI collective (e.g. ScaLAPACK pdtrsm); partitioning would deadlock at the next collective entry. No Allreduce on the result vector – every rank already holds the full answer.Failure propagation: a probe that returns NaN sets a per-rank local_failed flag. An MPI_Allreduce(MPI_LOR) on the flag (always issued before the result reduce, so all ranks agree) flips the global outcome to NaN-vector when any rank's probe failed. This avoids the footgun where a single rank's NaN pollutes the SUM-reduce silently into a finite-looking but wrong answer (NaN + finite = NaN, but the global pattern is still confusing across ranks; the explicit OR-flag makes the failure obvious in tests and downstream code).
Stateless. The executor holds no caches, no statics. run is const.
Definition in file ProbeExecutor.h.