GPU Code Development

In recent years, computation with graphics processing units (GPUs) has provided a method for accessing an amazing level of computing power. The CHARMS project aims to develop and utilize such tools for our purposes. Therefore,  we are active participants in the development and early utilization of Astaroth code, in collaboration with the Astroinformatics group at Aalto University in Finland ( 

The Code: Astaroth

Astaroth is a CUDA based library and application programming interface (API) which utilizes multiple GPUs efficiently in three-dimensional stencil computations. Astaroth allows for the free generalization of stencil operations, such as finite difference derivatives, and group them into a system of equations, such MHD equations. This is made possible by describing the operations in a domain specific language (DSL). The currently existing DSL code supports computing resistive MHD with 6th-order finite difference method and 3rd-order Runge-Kutta integration. 

Particularly noteworthy is the capacity of Astaroth to use high-order stencils efficiently and flexibly, because it requires special attention to memory optimization. The original proof-of-concept was published and discussed in Pekkilä, Väisälä et al. (2017) and Väisälä (2017). However, the old code has been superseded by a new version with a highly efficient cache blocking implementation presented by Pekkilä (2019). In CHARMS we are actively putting the code into use for astrophysics, as among the very first to do so. 

Astaroth is free and open source. More information will be available in the very near future from this page and from Aalto University Astroinformatics group.

Related Publications

  • Väisälä MS; Shang H; Galli D; Lizano S; Krasnopolsky R“Exploring the Formation of Resistive Pseudodisks with the GPU Code Astaroth” , ApJ: 959(1), id.32 (21pp), Dec, 2023 [SCI] ADS | Fulltext )
  • Väisälä MS; Pekkilä J; Käpylä MJ; Rheinhardt M; Shang HKrasnopolsky R“Interaction of Large- and Small-scale Dynamos in Isotropic Turbulent Flows from GPU-accelerated Simulations”, ApJ: 907(2), id 83 (18pp.), Feb, 2021 [SCI] ( ADS | Fulltext )