JuliaCon Local Paris 2025

Scalable architecture-agnostic finite differences with Chmy.jl
2025-10-02 , Jean-Baptiste Say Amphitheater
Language: English

We present Chmy.jl, a Julia package for developing scalable finite-difference solvers, with a focus on portability, ease of use, and minimal overhead. Chmy.jl contains modules for working with structured staggered grids, discrete fields, finite-difference and interpolation operators, boundary conditions, and distributed computing. Users can use Chmy.jl in functions that execute both on CPUs and GPUs supported by the JuliaGPU ecosystem.


Chmy.jl simplifies the implementation of finite-difference solvers for fluid dynamics simulations, with a focus on computational geodynamics and glaciology. It provides tools for writing finite-difference operators in a math-like notation to discretise coupled nonlinear advection-diffusion and Stokes equations. We support various staggered grid layouts, including Arakawa C- and E-grids, and support both Cartesian and curvilinear coordinates.

Despite leveraging multiple high-level features of Julia, Chmy.jl aims to introduce minimal overhead compared to manually written finite-difference code. All functions typically called in performance-critical paths are non-allocating and inlined. Using Chmy.jl, we scaled a Stokes solver to the full LUMI supercomputer, utilising 21,952 AMD MI250X GPUs and achieving 96% parallel efficiency with an effective resolution of 18,000³.

I'm an applied mathematician working in the field of computational glaciology. My interests include GPU computing, supercomputing, computational fluid dynamics, numerical analysis, to name a few.