|
Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
|
Worker-side loops for dynamic-assignment manager-worker MPI parallelism. More...
Go to the source code of this file.
Worker-side loops for dynamic-assignment manager-worker MPI parallelism.
RunWorkerLoop<TaskT, ResultT>: single-threaded worker. Receives tasks from rank 0, calls track_fn, sends results back. Exits on sentinel.
RunWorkerLoopThreaded<TaskT, ResultT>: multi-threaded worker. Spawns a WorkerThreadPool of n_threads tracking threads. The MPI communication thread (main) receives tasks one at a time (manager protocol unchanged) and submits them to the pool. Results are collected from the pool and sent back as they complete.
Thread safety: all MPI calls remain on the main thread (MPI_THREAD_FUNNELED). Each tracking thread owns its state (System copy + Tracker copy) built by state_factory.