|
Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
|
Namespaces | |
| namespace | detail |
Classes | |
| struct | StartPointTask |
| Work item for the speculative-full-path model: a path index plus its start point. More... | |
| struct | FullPathResult |
| Result of executing one WHOLE path: start -> endgame boundary -> target. More... | |
| class | ThreadSafeQueue |
| A simple thread-safe (mutex + condition-variable) FIFO queue. More... | |
| struct | PoolShutdownSentinel |
| class | WorkerThreadPool |
| Thread pool for parallel path tracking within a single MPI worker rank. More... | |
Functions | |
| void | Finalize () |
| Finalize the parallel (MPI) environment. | |
| void | Initialize () |
| Initialize the parallel (MPI) environment. | |
| int | Rank () |
| Get this process's rank (0 in serial builds). | |
| int | Size () |
| Get the number of ranks (1 in serial builds). | |
| bool | IsManager () |
| Query whether this rank is the manager (rank 0). | |
| bool | IsWorker () |
| Query whether this rank is a worker (rank != 0). | |
| unsigned | AvailableCpuCount () |
| The number of CPUs this process may run on. | |
| unsigned | EffectiveThreadCount (unsigned configured=0) |
| Resolve a configured thread count to the number of worker threads to actually spawn. | |
Variables | |
| constexpr int | TAG_WORK_ITEM = 1 |
| MPI message tag: manager -> worker work item. | |
| constexpr int | TAG_RESULT = 2 |
| MPI message tag: worker -> manager result. | |
| constexpr int | TAG_CAPACITY = 3 |
| MPI message tag: worker -> manager, max tasks in flight on that rank. | |
|
inline |
The number of CPUs this process may run on.
On Linux, the size of the process's CPU affinity mask, so a process bound to a subset of the machine (an MPI rank that mpirun bound, a job step confined to a cpuset) counts only its own CPUs, as OpenMP's default thread count does. Elsewhere, and if the mask cannot be read, std::thread::hardware_concurrency(). Always >= 1.
|
inline |
Resolve a configured thread count to the number of worker threads to actually spawn.
Precedence (highest first):
The same rule serves the standalone threaded solve and each MPI rank. OMP_NUM_THREADS has no effect.
Always returns >= 1 (a return of 1 means "run serially, no pool").
| void bertini::parallel::Finalize | ( | ) |
Finalize the parallel (MPI) environment.
| void bertini::parallel::Initialize | ( | ) |
Initialize the parallel (MPI) environment.
| bool bertini::parallel::IsManager | ( | ) |
Query whether this rank is the manager (rank 0).
| bool bertini::parallel::IsWorker | ( | ) |
Query whether this rank is a worker (rank != 0).
| int bertini::parallel::Rank | ( | ) |
Get this process's rank (0 in serial builds).
| int bertini::parallel::Size | ( | ) |
Get the number of ranks (1 in serial builds).
|
constexpr |
MPI message tag: worker -> manager, max tasks in flight on that rank.
|
constexpr |
MPI message tag: worker -> manager result.
|
constexpr |
MPI message tag: manager -> worker work item.