Scientific research is currently facing a "computing gap." On one side, we have entered the exascale era, characterized by massive supercomputers like Summit and Sunway that derive their power from heterogeneous architectures—combinations of traditional CPUs and specialized accelerators like GPUs, FPGAs, and TPUs. On the other side, the foundations of climate science, high-energy physics, and bioinformatics rest upon millions of lines of legacy code, often written in Fortran or C++ and optimized for serial, single-core execution.
The challenge is that these legacy codebases cannot simply be "recompiled" for modern hardware. The architectural shift from serial to massively parallel processing requires a fundamental rethink of how scientific logic is expressed and executed.
The Architectural Bottleneck
As Shel Swenson and colleagues argue in their work on Next-Gen Sequencing, most legacy software is "architecturally immobile." A CPU processes instructions like a single high-speed lane, while a GPU acts like a thousand-lane highway. If the software logic is written to assume a single lane, the other 999 lanes sit idle.
This mismatch creates a "data graveyard" where the ability to generate data (from detectors like the LHC or genomic sequencers) outpaces the ability to process it. In High Energy Physics, T. K. Aarrestad and the HEP Software Foundation note that the upcoming High-Luminosity LHC upgrade will produce data volumes that traditional CPU-centric software simply cannot handle.
Strategy 1: Native Re-implementation and Differentiable Frameworks
One prominent solution is to move away from legacy languages entirely and rebuild models using modern, hardware-aware frameworks like JAX or TensorFlow.
Libraries like GPflow, developed by Alexander Matthews and Mark van der Wilk, bridge this gap by using TensorFlow as a computational engine for Gaussian processes. This allows researchers to leverage automatic differentiation and GPU acceleration without manual gradient derivations.
Similarly, in climate modeling, the Pace project and JCM v1.0 by Ellen Davenport reimplement atmospheric dynamical cores in Python and JAX. By doing so, they achieve "performance portability"—the code can run on CPUs, GPUs, or TPUs with minimal changes—while enabling "differentiable programming," which allows machine learning models to be integrated directly into the physics loops.
Strategy 2: Automated Transpilation and Lifting
Rewriting millions of lines of code is often economically and scientifically unfeasible. To address this, researchers are developing tools to "lift" legacy code into modern formats.
Sahil Bhatia and Sophia Shao demonstrated a verified lifting framework that automatically translates legacy C++ and Python into optimized hardware instructions. This uses formal verification to ensure that the high-performance version is mathematically identical to the original, preserving scientific integrity.
Strategy 3: Non-Intrusive Offloading
For massive systems like the Community Earth System Model (CESM), a total rewrite is a "non-starter." Xiaohui Duan and their team achieved a breakthrough in Kilometer-Level Coupled Modeling by using a "non-intrusive" offloading toolkit. Instead of rewriting the model, they created a layer that intercepts heavy computations and redirects them to accelerators on the Sunway supercomputer. This approach boosted simulation speeds from 2 days per day to over 222 days per day, making decadal climate studies possible.
The Path Forward: Hardware Abstraction
The recurring theme across these papers—from Gyselalib++ in plasma physics to Pgx in reinforcement learning—is the need for hardware abstraction.
As Jens Domke and Anshu Dubey propose in their unifying framework, the goal is to allow domain scientists to focus on the "what" (the physics or biology) while the software stack handles the "how" (the hardware-specific optimization). This shift treats computational physics not just as a tool, but as a distinct paradigm essential for modern scientific discovery.