Kokkos PseudoSpectral Library

High-Performance C++: Transitioning from CPU to GPU with Kokkos

This project builds on the long-term development of a codebase employing pseudo-spectral methods. Originally initiated by Yannick Ponty in the early 2000s, the code was significantly enhanced between 2006 and 2015 by Alain Miniussi, who introduced modern software engineering practices such as design patterns, unit testing, version control, and parallelization using MPI and Pthreads. This solid foundation enabled the code to support numerous scientific publications and run efficiently on both local and national computing clusters.

However, with the rapid evolution of computing architectures—most notably the rise of GPUs as a standard in high-performance computing (HPC)—the existing code has become increasingly incompatible with modern platforms. The current challenge is to adapt the code to leverage these new architectures while preserving its performance, scalability, and scientific accuracy.

To meet this challenge, the project adopts Kokkos, a modern C++ performance portability library developed with support from the U.S. Department of Energy and the French CEA. Kokkos enables developers to write architecture-agnostic code that can be compiled and optimized for a variety of backends (e.g., CPU, GPU, OpenMP) without modifying the core algorithms. It abstracts away low-level hardware concerns, allowing scientific software to remain portable, maintainable, and scalable across heterogeneous systems.

The aim of this project is to develop a new C++ library—KOSPEL (Kokkos PseudoSpectral Library)—that reimplements pseudo-spectral methods using Kokkos. The initial phase will target single-GPU systems, with a second phase expanding to support multi-GPU clusters, ensuring strong scalability through MPI integration. This preparatory work lays the groundwork for the eventual migration of the legacy Cubby codebase to a modern, GPU-accelerated architecture.



Project Leader

Yannick Ponty. CNRS Research Director. Lagrange Laboratory CNRS/UMR 729, The Côte d’Azur Observatory - OCA. 

Project Participants

Sarah Ali. Intern, Master's student in Mathematical Engineering. Université Côte d'Azur.
Visualization of magnetic fields
Visualization of magnetic fields Visualization of magnetic fields from simulations performed with the MHD CUBBY code, shown in two distinct configurations: on the left, a model using penalization techniques to replicate the VKS dynamo experiment; on the right, the magnetic field generated by a Taylor-Green flow in a periodic box.