Introduction
Simulating the movement of neutral particles—such as neutrons in nuclear reactors or photons in medical imaging—through complex, heterogeneous materials is a cornerstone of computational physics. However, as supercomputer core counts continue to rise, traditional parallelization strategies are hitting a wall. Researchers from the University of Bristol and AWE have proposed a solution: an Asynchronous Many-Task (AMT) algorithm that replaces rigid synchronization with a fluid, dependency-driven execution model.
The Bottleneck: Bulk Synchronous Parallelism
The standard approach for solving neutral particle transport via the Discrete Ordinates ($S_N$) method involves "sweeping" across a spatial mesh. On unstructured grids, this process is governed by a Directed Acyclic Graph (DAG) of data dependencies, where the flux in a cell can only be calculated once its "upwind" neighbors are processed.
Traditionally, this is managed using Bulk Synchronous Parallelism (BSP). The mesh is partitioned into "wavefronts"—groups of cells that can be solved simultaneously. However, BSP requires a global synchronization barrier after each wavefront. On modern processors with over 100 cores, even minor variations in the time to solve a single cell (due to cache misses or OS jitter) cause significant "load imbalance," where many cores sit idle waiting for the slowest task to finish.
The AMT Solution
To overcome these barriers, the researchers developed the UnSNAP mini-app, implementing an AMT approach using OpenMP. Key features include:
- Recursive Task Generation: Instead of pre-calculating wavefronts, the algorithm uses a recursive "work-first" strategy. As a task completes a cell, it checks its downwind neighbors and immediately spawns new tasks if dependencies are met.
- Atomic Dependency Tracking: A bespoke system of atomic counters tracks when a cell's upwind dependencies are satisfied, triggering the next task without global synchronization.
- Work Stealing: By leveraging the LLVM/Cray OpenMP runtime, the system uses distributed queues and work-stealing to ensure that no core remains idle while work is available elsewhere in the DAG.
Performance Results
The AMT algorithm was evaluated across a diverse set of modern hardware, including Intel Sapphire Rapids, AMD Genoa/Bergamo, and the NVIDIA Grace Superchip.
The results demonstrate significant improvements over the BSP baseline:
- Significant Speedups: On Intel Sapphire Rapids, the AMT method achieved up to a 2.5x speedup for first-order Finite Element Method (FEM) solves compared to the traditional BSP approach.
- High Parallel Efficiency: On the NVIDIA Grace Superchip, the implementation maintained nearly 90% parallel efficiency for complex third-order problems, even when scaling across multiple sockets.
- Reduced Idle Time: Detailed profiling showed that time spent waiting at synchronization locks fell from over 33% in the BSP model to less than 10% with AMT.
Conclusion and Future Directions
While the AMT approach introduces some task orchestration overhead, its ability to hide latency and mitigate load imbalance makes it superior for high-core-count systems, particularly for lower-order simulations where "grind time" variance is high. Future work aims to extend this asynchronous model to GPU-accelerated systems and multi-node "Full Parallel Sweeps" to further push the boundaries of large-scale particle transport simulations.
Summary updated