PatCC1: an efficient parallel triangulation algorithm for spherical and planar grids with commonality and parallel consistency

Haoyu Yang, Li Liu, Cheng Zhang, Ruizhe Li, Chao Sun, Xinzhu Yu, Hao Yu, Zhiyuan Zhang, Bin Wang

Abstract

Graphs are commonly gridded by triangulation, i.e., the generation of a set of triangles for the points of the graph. This technique can also be used in a coupler to improve the commonality of data interpolation between different horizontal model grids. This paper proposes a new parallel triangulation algorithm, PatCC1 (PArallel Triangulation algorithm with Commonality and parallel Consistency, version 1), for spherical and planar grids. Experimental evaluation results demonstrate the efficient parallelization of PatCC1 using a hybrid of MPI (message passing interface) and OpenMP (Open Multi-Processing). They also show PatCC1 to have greater commonality than existing parallel triangulation algorithms and that it guarantees parallel consistency (i.e., it achieves exactly the same triangulation result under different parallel settings).

Introduction: The Challenge of Grid Integration

In Earth system modeling, different components—such as the atmosphere, ocean, and land—often utilize distinct coordinate grids. These range from regular latitude-longitude grids to complex "cubed-spheres" or unstructured meshes. To facilitate data exchange, a software layer known as a coupler must interpolate values between these diverse grids, a process called remapping.

Triangulation provides a robust "common language" for these grids. However, implementing triangulation in parallel is notoriously difficult. Existing algorithms frequently encounter three primary hurdles:

  1. Commonality: Inability to handle specialized grids, such as those with concave boundaries or points exactly at the poles.
  2. Parallel Efficiency: Difficulty in scaling as model resolutions reach millions of points, making triangulation a potential bottleneck.
  3. Parallel Consistency: Variations in triangulation results depending on the number of processors used, which can lead to non-reproducible scientific results.

The PatCC1 Algorithm

The authors introduce PatCC1 (PArallel Triangulation algorithm with Commonality and parallel Consistency) to address these issues. The algorithm's workflow is designed to maximize hardware utilization while ensuring mathematical rigor.

Workflow of the PatCC1 algorithm showing hybrid parallelization.

Key features of the PatCC1 methodology include:

  • Hybrid Parallelism: By combining MPI for inter-node communication and OpenMP for intra-node threading, PatCC1 fully exploits modern multi-core supercomputing architectures.
  • Stereographic Projection: To manage the Earth's curvature, local sub-domains are projected onto a 2D plane before applying standard Delaunay triangulation.
  • The Consistency Policy: To ensure identical results regardless of parallel settings, a strict tie-breaking rule based on coordinate values is enforced. This decides which triangles are "legal" when multiple valid Delaunay solutions exist for the same set of points.

Key Innovations: Geometry and Consistency

A significant contribution of PatCC1 is its approach to domain decomposition. Unlike previous methods that utilized "stripes" or "circles" to divide the grid, PatCC1 employs a recursive $k$-d tree to create overlapping rectangles.

Comparison of circular and rectangular decomposition strategies.

The researchers provide a geometric proof-of-concept showing that circular sub-domains require significantly larger overlapping areas (halos) than rectangles to guarantee a correct global triangulation. By using rectangles, PatCC1 minimizes this "halo" overhead, leading to higher computational efficiency. Furthermore, by enforcing a "leftmost/lower-left" point rule for triangles on a circle's circumference, the algorithm eliminates the ambiguity that typically causes parallel inconsistency.

Performance and Results

PatCC1 was evaluated using real-world model grids (e.g., CAM, POP, LICOM) and synthetic benchmarks ranging up to 10 million points. Key findings include:

  • Robustness: PatCC1 successfully triangulated all tested grids, including complex regional Arctic grids with concave boundaries where previous state-of-the-art algorithms failed.
  • Scalability: The algorithm achieved a 360-fold speedup for fine-resolution grids when utilizing 800 processor cores.
  • Speed: For a 10-million-point grid, PatCC1 completed triangulation in approximately 0.5 seconds on 800 cores, making it ideal for "online" remapping where weights are generated on the fly.

Conclusion and Future Work

PatCC1 represents a significant advancement in grid remapping for Earth system models. While highly efficient, future work will focus on automatically calculating optimal overlap expansion rates and moving toward finer-grained OpenMP implementations to further enhance performance on high-core-count nodes. The algorithm is slated for integration into the upcoming C-Coupler3, providing a standardized tool for the global modeling community.

Summary updated

BibTeX
@inproceedings{yang2019patcc,
  author = {Haoyu Yang and Li Liu and Cheng Zhang and Ruizhe Li and Chao Sun and Xinzhu Yu and Hao Yu and Zhiyuan Zhang and Bin Wang},
  title = {{PatCC1: an efficient parallel triangulation algorithm for spherical and planar grids with commonality and parallel consistency}},
  booktitle = {Geoscientific},
  year = {2019},
  doi = {10.5194/gmd-12-3311-2019},
}
Figure