Developing a mini-app for exploring algorithms for unstructured mesh deterministic discrete ordinates transport on many-core architectures

Tom Deakin, Simon McIntosh‐Smith, Justin Lovegrove, R.p. Smedley‐Stevenson, Andrew HaguesExplore 2019

TL;DR

This paper introduces UnSNAP, a mini-app designed to explore the performance of deterministic discrete ordinates transport on modern many-core architectures, particularly for unstructured meshes. They find that precomputing matrix inverses significantly speeds up calculations, but this comes at a substantial memory cost, especially for higher-order elements, suggesting cache hierarchy, not raw compute or memory bandwidth, is the primary performance bottleneck on CPUs.

What Problem Does This Paper Address?

Solving the deterministic discrete ordinates Boltzmann transport equation is computationally intensive, often consuming a significant portion of simulation time on high-performance computing (HPC) systems. This challenge is amplified when dealing with unstructured meshes, which offer greater flexibility in representing complex geometries but break the implicit spatial dependencies found in structured grids. This requires explicit calculation of sweep dependencies, leading to a large memory footprint. The paper aims to understand how to efficiently map this complex computational problem onto modern many-core architectures, which feature hierarchical memory and parallelism, and to identify the performance-limiting factors.

Methods

The core of the work involves the UnSNAP mini-app, a port of the SNAP proxy application. UnSNAP uses a discontinuous Galerkin finite element discretization for unstructured meshes and employs a "matrix-free" approach, meaning the large global matrix is not explicitly assembled. Instead, local matrices for each element, group, and angle are constructed and solved.

Two primary approaches for local matrix assembly are explored:

  1. "On-the-fly" assembly: The linear system is constructed and solved for each element, group, and angle during the sweep.
  2. "Precompute" assembly: Local matrices are assembled and inverted once per timestep. During the sweep, only a matrix-vector multiplication is performed, leveraging the precomputed inverse.

The paper also investigates performance on various CPU architectures (Intel Xeon, Marvell ThunderX2, IBM Power 9) and explores initial porting efforts to GPUs (NVIDIA P100, V100) using CUDA. Performance analysis utilizes techniques like the Roofline model and experiments comparing single-socket versus dual-socket configurations to understand memory bandwidth and cache hierarchy impacts.

Datasets

Not discussed in the paper. The paper uses a standard SNAP mesh for evaluation.

Key Insights and Ideas

  • Precomputation is King (for performance): Precomputing and storing the inverse of local matrices offers substantial speedups, especially for higher-order elements, by transforming the computationally expensive solve step into a much faster matrix-vector multiplication during the sweep.
  • Memory Footprint is the Achilles' Heel: The significant memory cost of storing precomputed inverses becomes a major limitation, particularly for high-order elements. This suggests that for architectures with limited memory capacity (like many GPUs), this approach may not be feasible without mesh coarsening.
  • Cache Hierarchy Dominates CPU Performance: For unstructured transport on modern CPUs, the performance bottleneck is not typically raw floating-point operations or main memory bandwidth, but rather the cache hierarchy. This is an unusual finding for applications with large memory footprints.
  • Unstructured Meshes Break Simplicity: The explicit handling of sweep dependencies in unstructured meshes introduces complexities that serialize certain parallelization strategies (e.g., angular dimension on CPUs) and require careful data management.

Key Results

  • The "precompute" approach for local matrix assembly yielded significant speedups: 1.9X, 2.1X, and 3.2X faster for first, second, and third-order finite elements, respectively, compared to "on-the-fly" assembly on Intel Broadwell.
  • Intel Xeon Skylake processors provided the fastest runtime among the tested CPUs, offering 1.5–4.1X speedup over Intel Broadwell processors across various element orders.
  • The IBM Power 9 processor did not show performance improvement over the Broadwell processor for the tested problem.
  • Experiments comparing single-socket versus dual-socket configurations showed that for most cases, adding a second socket provided no benefit, indicating the application is bound by on-core resources rather than main memory bandwidth.
  • For linear elements on Broadwell and Power 9, using two sockets even reduced performance, with L2 cache hits dropping drastically.
  • The memory requirements for storing precomputed matrices for a problem with ~1 million transport DoF were substantial: 0.67 GB (1st order), 7.64 GB (2nd order), and 42.95 GB (3rd order).

Limitations and Future Work

  • GPU Performance Needs Improvement: The initial GPU porting efforts showed insufficient parallelism and underutilization of the hardware. Further research into algorithmic changes is needed to better suit GPU architectures.
  • Memory Footprint vs. Order: The significant memory cost of precomputed inverses limits their applicability to higher-order elements on memory-constrained architectures. Future work should explore mesh coarsening strategies to fit these constraints.
  • Cache Hierarchy Nuances: While the cache hierarchy is identified as the performance limiter on CPUs, the exact nature of this bound requires further study.
  • Time-Dependent Transport: The current mini-app focuses on stationary transport and omits the time-dependent term and its associated diamond difference update for simplicity.
  • AMR Meshes: The mini-app does not currently use flux interpolation during upwinding, which would be necessary for adaptive mesh refinement (AMR) scenarios with multiple neighboring elements.

Summary updated

BibTeX
@inproceedings{deakin2019developing,
  author = {Tom Deakin and Simon McIntosh‐Smith and Justin Lovegrove and R.P. Smedley‐Stevenson and Andrew Hagues},
  title = {{Developing a mini-app for exploring algorithms for unstructured mesh deterministic discrete ordinates transport on many-core architectures}},
  booktitle = {Explore},
  year = {2019},
}
Figure