[Paper Review] Using Machine Learning at Scale in HPC Simulations with SmartSim: An Application to Ocean Climate Modeling
This paper presents SmartSim, a software framework enabling scalable, online machine learning inference within high-performance computing (HPC) simulations. It integrates PyTorch, TensorFlow, and ONNX models into Fortran-based ocean climate models like MOM6, demonstrating 12-member global ocean simulations with 970 billion inferences over 120 years—achieving stable performance with minimal runtime overhead.
We demonstrate the first climate-scale, numerical ocean simulations improved through distributed, online inference of Deep Neural Networks (DNN) using SmartSim. SmartSim is a library dedicated to enabling online analysis and Machine Learning (ML) for traditional HPC simulations. In this paper, we detail the SmartSim architecture and provide benchmarks including online inference with a shared ML model on heterogeneous HPC systems. We demonstrate the capability of SmartSim by using it to run a 12-member ensemble of global-scale, high-resolution ocean simulations, each spanning 19 compute nodes, all communicating with the same ML architecture at each simulation timestep. In total, 970 billion inferences are collectively served by running the ensemble for a total of 120 simulated years. Finally, we show our solution is stable over the full duration of the model integrations, and that the inclusion of machine learning has minimal impact on the simulation runtimes.
Motivation & Objective
- Address the challenge of coupling machine learning with traditional HPC simulations written in Fortran/C/C++ without file I/O bottlenecks.
- Enable real-time, distributed inference of deep neural networks during long-running climate simulations.
- Overcome language and data exchange barriers between HPC workloads and modern ML libraries.
- Demonstrate scalability and stability of ML-augmented HPC simulations at climate-scale resolution.
- Provide a flexible, library-agnostic interface that supports heterogeneous HPC systems and multiple ML frameworks.
Proposed method
- Leverage SmartSim’s Infrastructure and Client libraries to decouple ML inference from simulation logic.
- Use the SmartRedis API to enable low-latency, remote execution of ML models from Fortran simulations.
- Integrate JIT-traced PyTorch models into MOM6 to replace a traditional eddy kinetic energy parameterization.
- Deploy a shared ML model across 12 ensemble members, each running on 19 nodes, with synchronized inference at each timestep.
- Utilize Redis-based data exchange to eliminate file I/O overhead and enable real-time data flow between simulation and ML components.
- Support heterogeneous HPC systems with CPU and GPU workloads, ensuring interoperability across diverse hardware and software stacks.
Experimental results
Research questions
- RQ1Can machine learning be integrated into large-scale, production-grade HPC climate simulations without disrupting simulation stability or performance?
- RQ2How efficiently can a single ML model serve distributed, real-time inference across multiple HPC simulation instances at scale?
- RQ3What is the performance overhead of online ML inference when integrated into a global ocean model using a shared model architecture?
- RQ4Can the SmartSim framework enable seamless, language-agnostic communication between Fortran-based simulations and modern ML libraries like PyTorch and TensorFlow?
- RQ5Does the integration of ML inference via SmartSim preserve numerical stability over long-duration climate simulations?
Key findings
- The SmartSim-EKE ensemble successfully completed 12 global, high-resolution ocean simulations over 10 years each, with no observed numerical instability.
- A total of 970 billion inference operations were performed across the ensemble during 120 simulated years, demonstrating scalability at exascale-relevant scale.
- The integration of ML inference via SmartSim introduced minimal performance overhead, with simulation runtimes largely unaffected.
- The framework achieved linear scaling across thousands of processors on heterogeneous HPC systems, supporting both CPU and GPU workloads.
- The use of a shared ML model across all ensemble members enabled consistent, synchronized inference without per-simulation model duplication.
- The solution is production-ready and fully reproducible, with all source code, datasets, and trained models publicly available on GitHub.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.