As part of our research on application frameworks, we have developed a framework for computational fluid dynamics applications using the Adaptive Mesh Refinement (AMR) algorithm. AMR allows for significant reduction of both compute and memory requirements by adaptively managing mesh granularity of a given simulation domain; however, in reality, due to its complexity in dynamically changing mesh granularity, it has only been employed in a very limited set of relatively small-scale applications.
This problem is particularly challenging in heterogeneous systems with GPU accelerators since the overhead of data movement is much greater. To solve the problem, we have developed the Daino framework, which allows the user to develop high-performance AMR applications in a simple manner. The framework extends an existing standard compiler and aggressively applies automated program-transformation techniques for optimizing user applications for target architectures such as GPUs. As a result, an application developed using Daino is portable in both functionality and performance, as the automated translation of user code ensures that the application runs on different parallel systems efficiently without target-specific manual optimization. Our results demonstrated that an approach based on high-level frameworks such as Daino can achieve both high performance and high productivity even with complex large-scale systems such as supercomputers using GPU accelerators.