Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
Loading...
Searching...
No Matches
manager.hpp File Reference

Generic manager (rank 0) loop for dynamic-assignment manager-worker MPI parallelism. More...

Go to the source code of this file.

Detailed Description

Generic manager (rank 0) loop for dynamic-assignment manager-worker MPI parallelism.

RunManagerLoop<TaskT, ResultT> uses credit-based dispatch: each worker announces its capacity (number of tracking threads) at loop start via TAG_CAPACITY; the manager keeps up to that many tasks outstanding per rank, dispatching a new task each time a result arrives. Workers are told to stop by receiving a sentinel task, sent only once that rank has zero tasks outstanding.

Requirements:

  • TaskT must be Boost.MPI-serializable
  • ResultT must be Boost.MPI-serializable
  • sentinel must be a TaskT value that workers can detect via is_sentinel() (or be a dedicated out-of-band value)

For Phase 1 (before-EG), TaskT = std::size_t (path index) with sentinel = std::numeric_limits<std::size_t>::max().

For Phase 2 (during-EG), TaskT = Phase2Task<ComplexT> with sentinel constructed via Phase2Task<ComplexT>::sentinel().