TL;DR
This paper presents a parallel computing infrastructure for an unstructured-mesh global climate model (GRIST) that significantly boosts performance. By optimizing mesh partitioning, cache efficiency through index reordering, and I/O operations with a novel group I/O strategy, the authors enable faster, more efficient simulations, crucial for advancing climate modeling.
What Problem Does This Paper Address?
Developing high-resolution global atmospheric models is computationally demanding. Traditional models often use structured grids, which simplify parallelization and data handling. However, unstructured grids offer greater flexibility, particularly for variable-resolution simulations, but pose significant challenges for parallel computing. These challenges include:
- General and balanced mesh partitioning: Dividing complex, non-uniform meshes across many processors while ensuring an even workload is difficult.
- Efficient stencil calculations: Accessing neighboring data on unstructured meshes requires indirect addressing, which can lead to poor cache utilization and slower computations.
- I/O bottlenecks: Handling large datasets from massively parallel simulations on unstructured grids is inefficient due to discontinuous data access patterns.
This paper tackles these issues to create a more performant and user-friendly parallel computing infrastructure for unstructured-mesh global models.
Methods
The authors focus on three key areas to optimize their unstructured-mesh global model (GRIST):
- Parallelization and Mesh Partitioning: They employ the METIS library for partitioning the global mesh. METIS is a graph partitioning tool that aims to minimize communication between processors while ensuring a balanced workload. A general communication interface is also designed to simplify usage for model developers.
- Index Optimization (Cache Efficiency): To improve the performance of stencil calculations, which heavily rely on accessing neighboring data, they investigate mesh index reordering strategies. Three methods are explored: Breadth-First Search (BFS), Hilbert curve, and Morton curve. These strategies aim to arrange data in memory such that frequently accessed neighboring points are located closer together, enhancing cache hit rates.
- Group Parallel I/O Strategy: To address I/O bottlenecks, they implement a "group I/O" method. In this approach, processes are grouped, and within each group, a single "I/O process" handles all interactions with the parallel file system. This reduces the number of processes directly accessing the file system, improving I/O granularity and efficiency.
Datasets
Not discussed in the paper. The paper focuses on the development and performance of the computational infrastructure itself, using simulated data for testing.
Key Insights and Ideas
- METIS is a robust choice for unstructured mesh partitioning: The paper demonstrates that METIS provides an efficient and flexible way to partition both quasi-uniform and variable-resolution meshes, ensuring good load balance and manageable communication.
- Index reordering significantly boosts cache efficiency: The indirect addressing required for stencil calculations on unstructured meshes is a performance bottleneck. Reordering indices using strategies like BFS can lead to substantial speedups, especially when running with fewer processes.
- Group I/O is crucial for large-scale simulations: The traditional approach of each process directly interacting with the parallel file system becomes a major bottleneck at high resolutions and large process counts. The group I/O strategy effectively mitigates this by serializing I/O operations through dedicated processes, leading to dramatic improvements.
- Abstraction simplifies developer experience: Encapsulating these complex parallelization, optimization, and I/O strategies within a few user-friendly interfaces significantly reduces the burden on model developers, accelerating iterative development.
Key Results
- Parallelization: Scaling tests show the METIS-based partitioning method is efficient.
- Index Optimization: The investigated index reordering strategies (BFS, Hilbert, Morton) accelerate calculations, with BFS often yielding the best results. Speedups of up to 1.42x were observed for the G10 grid. The effect is more pronounced with fewer processes.
- Group I/O: The group I/O method significantly improves I/O efficiency. For data input on the G10 grid with 4200 processes, speedups of over 90x were achieved compared to the original method. For data output on G8 and G8X4 grids, speedups exceeding 100x were observed.
Limitations and Future Work
- Limitations: The paper notes that the optimization effect of index reordering becomes less significant as the number of processes increases, as more data is already in cache. The performance gains for data output are generally less pronounced than for data input, attributed to the "more discontinuous" nature of input data (e.g., vertical layers).
- Future Work: The authors suggest that asynchronous communication technology could be implemented to overlap computations with inter-process communication, further hiding communication latency. They also plan to apply heterogeneous many-core acceleration techniques for porting the model to supercomputers like Sunway TaihuLight for even higher efficiency. The development of developer-friendly interfaces is highlighted as a key aspect that will benefit future model development and the addition of new dynamical models.
Summary updated