Towards Code Generation for Octree-Based Multigrid Solvers
Richard Angersbach, Sebastian Kuckuck, Harald Köstler
TL;DR
The paper addresses the challenge of solving PDEs with multigrid methods on locally refined octree meshes by introducing a code-generation workflow that produces optimized multigrid solvers and refined communication kernels. It couples ExaStencils with waLBerla to generate specialized kernels and communication routines that support coarse-to-fine and fine-to-coarse transfers while maintaining convergence of the discretization. Key contributions include new C2F and F2C schemes that minimize ghost data, dynamic data-structures to handle variable neighbor counts, a modular communication design, and comprehensive weak-scaling validation on the SuperMUC-NG cluster demonstrating substantial performance gains over manual implementations. The work shows that automated generation of refinement-aware multigrid components can yield accurate, scalable solvers for octree-based domains and paves the way for portability to other coefficients and accelerator platforms.
Abstract
This paper presents a novel method designed to generate multigrid solvers optimized for octree-based software frameworks. Our approach focuses on accurately capturing local features within a domain while leveraging the efficiency inherent in multigrid techniques. We outline the essential steps involved in generating specialized kernels for local refinement and communication routines, integrating on-the-fly interpolations to seamlessly transfer information between refinement levels. For this purpose, we established a software coupling via an automatic fusion of generated multigrid solvers and communication kernels with manual implementations of complex octree data structures and algorithms often found in established software frameworks. We demonstrate the effectiveness of our method through numerical experiments with different interpolation orders. Large-scale benchmarks conducted on the SuperMUC-NG CPU cluster underscore the advantages of our approach, offering a comparison against a reference implementation to highlight the benefits of our method and code generation in general.
