GemPBA
GemPBA is a hybrid parallelization framework for branching algorithms. It supports:
- Multithreading — multiple worker threads within a single process
- Multiprocessing — work distributed across multiple processes (OpenMPI by default, but pluggable)
- Hybrid — multiple threads per process, spread across multiple nodes
There are two main research contributions baked into the framework.
The first is the Quasi-Horizontal Load Balancing strategy. Standard work-stealing treats all pending tasks equally. Quasi-horizontal balancing understands the shape of your recursion tree and selects work near the root, where each task will spawn the most downstream work. For branching algorithms where subtree sizes vary dramatically, this makes a significant difference in CPU utilization.
The second is the Semi-Centralized Scheduler. Distributing work across processes sounds straightforward until you hit the rejected task problem: a worker receives a task, but by the time it arrives the worker is already busy and has to bounce it back to the sender. Do this naively and you spend more time rerouting work than doing it. The semi-centralized design avoids this by keeping a lightweight center that never holds tasks itself but maintains global priority awareness. The center always knows which worker is idle and routes tasks directly there, eliminating the bounce-back problem without becoming a bottleneck.
For the full performance analysis and formal description, see:
Explore the internals
For a navigable, AI-assisted deep-dive into GemPBA's architecture and source, browse the GemPBA DeepWiki — auto-generated and refreshed periodically.
GemPBA Dashboard
A desktop app that connects to a running GemPBA program and shows the whole run live: every node and worker, CPU and memory as they move, and the task traffic between processes.
- See every node at a glance: one live tile each, CPU and memory.
- Drill into any node for per-worker CPU, affinity, task flow, and peer traffic.
- Connect locally, or straight to an HPC compute node through an MFA login node, with no manual tunnel.
Flavors
GemPBA ships in two flavors that install side by side on any platform:
- Multithreading (
mt) — the default; uses all cores of a single machine. - Multiprocessing (
mpi) — distributes work across multiple machines/nodes over MPI.
You pick which one a program uses at build time. See Installation for APT / MSYS2 / Homebrew instructions and the flavor-selection API.
Using Java?
GemPBA ships as a Maven dependency too (from v4.1.0) — import io.gempba.* and call the same scheduler from the JVM. See the Java section.
Platforms
Pre-built packages and the Java fat JAR target one architecture per OS; other architectures work via source build.
| OS | Architecture |
|---|---|
| Linux | x86_64 |
| Windows | x86_64 |
| macOS | aarch64 (Apple Silicon) |
Requirements
| Dependency | Version | Notes |
|---|---|---|
| C++ compiler | C++23 | GCC 13+, Clang 17+, AppleClang, MSVC 19.38+ |
| CMake | ≥ 3.28 | |
| hwloc | any recent | Hardware-topology probe (telemetry) |
| OpenMPI | ≥ 4.0 | Only for the multiprocessing flavor |
| spdlog / fmt | any recent | System-provided |
| Boost | any recent | Optional — tests only |
| GoogleTest | any recent | Optional — running tests only |