Abstract
This paper introduces GLTO, an OpenMP runtime implementation leveraging the Generic Lightweight Threads (GLT) API to address the overhead limitations of traditional POSIX thread (pthread) based runtimes. By mapping OpenMP threads and tasks to user-level threads (ULTs) and tasklets, GLTO provides a unified abstraction layer over various lightweight thread (LWT) libraries. Evaluation across synthetic and real-world benchmarks demonstrates that while pthreads remain efficient for coarse-grained loops, GLTO offers significant performance advantages—often by an order of magnitude—for nested parallelism and fine-grained tasking.
Introduction
Shared-memory parallel programming relies heavily on OpenMP, which is traditionally implemented using kernel-level pthreads. While effective for coarse-grained parallelism, pthreads incur high management overheads (creation, synchronization, and context switching) that hinder performance in modern exascale applications requiring millions of fine-grained tasks. User-Level Threads (ULTs) or Lightweight Threads (LWTs) offer a more efficient alternative by managing concurrency in user space. However, the fragmentation of LWT APIs has limited their integration into standard OpenMP runtimes. This work presents GLTO, a unified runtime that leverages LWTs to improve performance in dynamic and nested parallel workloads.
Methodology: The GLTO Framework
GLTO is built upon the BOLT project and the LLVM/Intel OpenMP runtime. Its primary innovation is the use of the GLT (Generic Lightweight Threads) API, which acts as a wrapper for multiple LWT backends, including Argobots, Qthreads, and MassiveThreads.
The runtime maps OpenMP constructs to specific GLT entities. OpenMP "threads" are mapped to OS-level execution streams, while "tasks" and work units are instantiated as lightweight GLT_ults or tasklets. This allows the system to handle high levels of concurrency without the resource contention typical of thread oversubscription.
Key Insights and Results
The researchers evaluated GLTO using benchmarks such as UTS (Unbalanced Tree Search), CloverLeaf, and Conjugate Gradient (CG).
- Nested Parallelism: GLTO demonstrated a performance advantage of at least one order of magnitude over pthread-based runtimes in nested loop scenarios. By using a fixed pool of OS threads and scheduling lightweight tasks on top, GLTO avoids the "oversubscription trap" where thousands of OS threads compete for CPU time.
- Tasking Granularity: In task-based workloads like CG, traditional runtimes (e.g., Intel) often suffer from contention in internal task queues as task sizes decrease. GLTO, particularly with the Argobots backend, maintains efficient performance even with fine-grained tasks.
- Performance Trade-offs: The study confirms that pthreads remain the optimal choice for simple, non-nested, compute-bound loops (as seen in the CloverLeaf mini-app). The overhead of LWT management only yields benefits when the workload is sufficiently complex or dynamic.
- Specification Compliance: GLTO passed 121 out of 122 tests in the OpenUH OpenMP Validation Suite, outperforming standard GNU and Intel runtimes in terms of spec compliance.
Conclusion
GLTO proves that lightweight thread approaches are highly effective for modern, complex OpenMP workloads. While traditional pthreads are still preferred for static loops, LWTs provide the scalability needed for nested and fine-grained parallelism. Future OpenMP runtimes may benefit from a hybrid approach, dynamically selecting the execution model based on the parallel construct's characteristics.
Summary updated