Benchmarking mf6Voronoi v0.0.38: Parallel Performance, Scaling Limits, and Mesh Refinement Dynamics
/With the upcoming release of mf6Voronoi v0.0.38, optimizing mesh generation workflows remains a top priority. Constructing complex unstructured Voronoi grids for MODFLOW 6 can become computationally intensive as spatial resolution increases. To address this challenge, parallel execution capabilities were introduced into mf6Voronoi leveraging dask-geopandas.
To quantify these performance enhancements and evaluate structural limits, two core benchmarks were conducted on the test case c8_lowerOuachitaSmackover:
Processor Scaling Benchmark: Evaluating performance variations across single-core vs. multi-core configurations (1 to 12 processors).
Cell Resolution Benchmark: Assessing grid throughput under increasing spatial refinement (from ~349K to ~900K cells) using an optimal 6-processor setup.
Benchmark Environment & Setup
All benchmarking routines were executed within the following virtualized development environment:
Operating System: Ubuntu 24.04 LTS running inside Windows Subsystem for Linux (WSL2).
Processor: Intel Core i5 (12th Generation).
System RAM: 12 GB.
Note on Virtualization Overhead: Running Linux tasks within WSL2 introduces containerization and virtualization layers that consume CPU cycles and memory bandwidth. As a result, absolute processing times reported here reflect a virtualized baseline and are generally higher than what would be observed on a native Linux installation.
Test Case 1: Parallel Processing & Processor Scaling
The first experiment compared the baseline single-threaded run (normalRun) against parallel execution with Dask (parallelRun) across processor allocations ranging from 1 to 12 cores.
Key Findings & Observations:
Initial Dask Overhead: Shifting point cloud processing to Dask structures introduces a minor computational overhead (~2.5% increase in initial setup time) due to task scheduling and memory partitioning.
Voronoi Generation Speedup: The Voronoi mesh creation stage benefited immensely from parallelization. Time dropped from 344.94 seconds on a single thread down to 156.46 seconds with 2 processors, ultimately reaching 68.46 seconds at 6 processors—a more than 5x speedup for that specific phase.
Optimal Processor Scaling Threshold: Total runtime decreases steadily as processors increase, reaching a peak speedup factor of 1.60x (557.79s) at 6 processors. Beyond 6 cores, runtime plateaus and exhibits erratic behavior (fluctuating between 578s and 621s).
Component Bottleneck: As seen in the breakdown chart, the speedup is almost entirely concentrated in Voronoi mesh creation. Point cloud generation remains essentially constant across all core configurations because it has not yet been parallelized.
Test Case 2: Scaling Grid Resolution (Cell Density)
Using the optimal configuration of 6 processors, a second series of benchmarks was performed by progressively decreasing mesh refinement parameters to evaluate system throughput across 6 iterations.
Key Findings & Observations:
Linear Execution Scaling: Total execution time displays a strong linear relationship relative to cell count. The minor non-linear fluctuations ("noise") in the curve are primarily due to host OS background tasks in Windows/WSL2.
Consistent Processing Throughput: For a grid with 349K cells, the total execution time was ~12 minutes (28.8K cells/min). When scaling up to 900K cells, the execution time reached ~32.4 minutes (27.8K cells/min). This stable processing rate confirms that overall system efficiency does not degrade as spatial resolution grows.
Diverging Time Breakdown: As grid density grows, Point Generation time increases at a significantly steeper rate than Voronoi Generation time. At 900K cells, point generation accounts for 1,754 seconds (90.2%) of the total runtime, whereas Voronoi mesh generation requires only 189.8 seconds (9.8%).
Conclusions & Future Roadmap
Demonstrated Parallel Speedup: Integrating dask-geopandas into mf6Voronoi v0.0.38 successfully reduces total runtime by up to 40% when running on 6 processors.
Hardware Constraints: On mid-range consumer processors (such as the 12th Gen Intel i5 inside WSL2), performance gains peak at 5 to 6 physical cores. Allocating additional threads beyond this threshold yields diminishing returns due to process scheduling overhead.
Primary Optimization Target: While Dask integration has effectively solved the Voronoi mesh calculation bottleneck, Point Cloud Generation remains single-threaded. Future development iterations of mf6Voronoi will focus on refactoring point generation routines to fully parallelize the pipeline and achieve even lower execution times.
