Introduction
In the high-performance computing (HPC) community, understanding how developers utilize parallel programming models has historically relied on anecdotal evidence or feedback from specific supercomputing centers. While OpenMP (Open Multi-Processing) has long been considered the standard for shared-memory systems, empirical data regarding its specific usage patterns, adoption rates, and evolution across different programming languages has been scarce. This research addresses this gap by introducing HPCORPUS, a massive dataset derived from GitHub, to provide a quantitative foundation for understanding the current state of parallel programming.
Methodology: Mining the HPC Landscape
To move beyond anecdotes, the researchers employed a "Big Data" approach to analyze the broader developer ecosystem. Using Google BigQuery, they scanned publicly available GitHub repositories for source files in C, C++, and Fortran. The resulting dataset, HPCORPUS, is extensive, containing over 4.5 million C files, 4.7 million C++ files, and 138,000 Fortran files, spanning a total of 156 million functions.
To ensure the integrity of the analysis, the team implemented a rigorous pipeline:
- Deduplication: Removing redundant files to prevent popular libraries from skewing the statistical results.
- API Identification: Identifying signatures for various parallel models, including OpenMP, MPI, CUDA, OpenCL, TBB, Cilk, OpenACC, and SYCL.
- Granular Parsing: For OpenMP, the researchers performed a deep dive, counting specific directives (e.g.,
#pragma omp parallel) and clauses (e.g.,private,reduction) across versions 2.5 through 5.2 of the OpenMP specification.
The Dominance of OpenMP
The analysis confirms that OpenMP is the undisputed leader in parallel programming. It accounts for 45% of all parallelized repositories identified in the study, significantly outperforming MPI (27.1%) and GPU-specific models like CUDA (10.2%). Since 2013, OpenMP has shown continuous growth in new repository adoption, suggesting it remains the primary choice for developers as they adapt to multi-core architectures.
Language-Specific Usage Patterns
The study reveals fascinating differences in how developers approach parallelism across different languages:
- Fortran vs. C++: Fortran programmers parallelize a higher percentage of their loops (2.2%) compared to C++ programmers (0.54%). However, C++ users tend to be "power users" of modern features, showing much higher adoption of SIMD vectorization and GPU offloading via
targetdirectives. - The Rise of Offloading: In C++ code, the
targetconstruct appeared over 78,000 times, signaling a major shift toward heterogeneous computing and the use of accelerators. - The "Common Core": While most developers stick to a small subset of constructs (like
parallel for), the data suggests the academic definition of the OpenMP "common core" should be updated. For instance, thelastprivateclause saw unexpectedly high usage, indicating it is more essential to real-world programming than previously thought.
Evolution and Modern Trends
Contrary to the perception that HPC is a stagnant field, the data shows that OpenMP is evolving. There is a clear upward trend in the adoption of newer features, such as the task construct for irregular parallelism, as new versions of the specification are released. The researchers also identified over 21 million for loops in C code alone, highlighting a massive opportunity for the development of auto-parallelization tools.
Limitations and Future Outlook
While GitHub provides a valuable proxy for the developer community, the authors acknowledge that it may not capture the full picture of "extreme-scale" HPC. Much of the code running on the world's largest supercomputers resides behind the firewalls of national laboratories and private corporations, where MPI usage might be more prevalent than GitHub data suggests.
Looking forward, the researchers intend to use HPCORPUS to train Large Language Models (LLMs) specifically for HPC. By providing these models with a high-quality, large-scale dataset of parallel code, the goal is to develop AI that can reason about parallel correctness and automatically suggest optimization strategies for complex, real-world applications. Future work will also expand this analysis to include modern languages such as Python (via Numba), Rust, and Julia.
Summary updated