[Paper Review] Flexible, Scalable Mesh and Data Management using PETSc DMPlex
This paper presents the integration of PETSc's DMPlex mesh and data management API into the Fluidity CFD application to offload mesh input, domain partitioning, and reordering to a scalable, extensible library layer. The approach reduces simulation startup time by improving mesh distribution and enabling native support for multiple file formats and RCM reordering, with performance gains up to 25% on 96 cores due to better cache locality and reduced communication overhead.
Designing a scientific software stack to meet the needs of the next-generation of mesh-based simulation demands, not only scalable and efficient mesh and data management on a wide range of platforms, but also an abstraction layer that makes it useful for a wide range of application codes. Common utility tasks, such as file I/O, mesh distribution, and work partitioning, should be delegated to external libraries in order to promote code re-use, extensibility and software interoperability. In this paper we demonstrate the use of PETSc's DMPlex data management API to perform mesh input and domain partitioning in Fluidity, a large scale CFD application. We demonstrate that raising the level of abstraction adds new functionality to the application code, such as support for additional mesh file formats and mesh re- ordering, while improving simulation startup cost through more efficient mesh distribution. Moreover, the separation of concerns accomplished through this interface shifts critical performance and interoperability issues, such as scalable I/O and file format support, to a widely used and supported open source community library, improving the sustainability, performance, and functionality of Fluidity.
Motivation & Objective
- To address performance bottlenecks in large-scale CFD simulations caused by inefficient mesh input and domain partitioning during initialization.
- To improve interoperability and code reuse by delegating common mesh and data management tasks to a shared, well-supported library.
- To enable advanced mesh optimizations—such as reordering and dynamic load balancing—through a high-level abstraction layer.
- To reduce application-level complexity by decoupling low-level I/O and distribution logic from the core simulation code.
- To enhance long-term maintainability and extensibility by inheriting future improvements from the PETSc ecosystem.
Proposed method
- Integration of PETSc’s DMPlex API as a domain topology abstraction layer to represent unstructured mesh connectivity via a layered directed acyclic graph (DAG).
- Replacement of Fluidity’s custom mesh input and partitioning pipeline with DMPlex’s native support for multiple file formats, including Exodus II, CGNS, Gmsh, Fluent Case, and MED.
- Use of DMPlex’s scalable mesh distribution and data migration primitives to reduce communication volume during initialization by distributing only topology and coordinates, not assembled fields.
- Runtime application of Reverse Cuthill-McKee (RCM) reordering to improve cache locality and reduce solver time in linear system assembly.
- Leveraging PETSc’s HDF5-based I/O stack for efficient, parallel file access and future support for Xdmf output formats.
- Benchmarking on the Archer Cray XC30 system to compare performance across 24–96 cores using a 3M-element mesh.
Experimental results
Research questions
- RQ1Can integrating DMPlex into Fluidity significantly reduce simulation startup time by improving mesh distribution and I/O efficiency?
- RQ2To what extent does DMPlex enable native support for multiple mesh file formats without modifying the application code?
- RQ3How does RCM reordering via DMPlex affect solver performance and overall simulation time at scale?
- RQ4What performance gains are achievable through decoupling mesh management from the application layer and relying on a shared, optimized library?
- RQ5Can the abstraction provided by DMPlex enable future extensibility, such as parallel mesh input and dynamic load balancing after mesh adaptation?
Key findings
- The DMPlex-based initialization workflow reduced startup overhead by up to 25% on 96 cores compared to the original preprocessor approach, primarily due to more efficient mesh distribution.
- The performance improvement was most pronounced at scale, with gains increasing as the number of processes grew, due to reduced communication volume during mesh migration.
- RCM reordering improved solver and matrix assembly performance on small-scale runs (up to 24 cores), but benefits diminished at scale due to fixed-cost overhead of permutation generation.
- The integration enabled native support for five additional mesh formats—Exodus II, CGNS, Gmsh, Fluent Case, and MED—without changes to Fluidity’s core codebase.
- The separation of concerns allowed Fluidity to inherit future optimizations in PETSc’s I/O and partitioning stack, improving long-term maintainability and interoperability.
- The sequential bottleneck in file I/O was reduced, though not eliminated, as the initial read remains a limiting factor, highlighting the need for fully parallel mesh readers in future work.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.