Jiayi Lai , Lanning Wang , Yizhou Yang , Qizhong Wu , Mengxuan Chen
{"title":"Evaluating effectiveness of round-off error compensation with three methods in shallow-water models","authors":"Jiayi Lai , Lanning Wang , Yizhou Yang , Qizhong Wu , Mengxuan Chen","doi":"10.1016/j.ocemod.2025.102617","DOIUrl":null,"url":null,"abstract":"<div><div>High-performance computing (HPC) limitations remain a significant bottleneck in the development of numerical models. Mixed-precision techniques, which reduce arithmetic precision to improve speed and memory efficiency, offer a promising solution. However, these methods inevitably introduce increased round-off errors that may destabilize model integrations and require smaller integration steps. This study investigates whether round-off error compensation methods can mitigate such precision-reduced errors. Three widely used methods are evaluated including Gill, Kahan, and Quasi Double-Precision (QDP) within shallow-water models. The suitability of using the double-precision fourth-order Runge-Kutta (RK4-DBL) method as a benchmark is first validated through idealized 1D linear shallow-water model experiments with known analytical solutions. Subsequently, ten perturbed initial-condition experiments are conducted for 2D nonlinear shallow-water model to assess the robustness of each compensation method relative to the RK4-DBL benchmark. When applied to fourth-order Runge-Kutta (RK4) in single precision (RK4-SGL), the Gill, Kahan and QDP methods reduce surface-height root-mean-square (RMSE) errors by approximately one order, four orders, and half an order of magnitude, respectively. In terms of computational cost, runtimes increased by 53%, 4%, and 7% relative to the double-precision reference, respectively. Among these compensation methods, the Kahan method achieves the best performance in both error compensation and computational efficiency, followed by the Gill method. The QDP method, though less effective than the other two, still provides meaningful improvements. Overall, this study demonstrates that these three round-off error compensation methods can improve the accuracy of mixed-precision numerical models while maintaining a reasonable computational cost.</div></div>","PeriodicalId":19457,"journal":{"name":"Ocean Modelling","volume":"198 ","pages":"Article 102617"},"PeriodicalIF":2.9000,"publicationDate":"2025-08-05","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Ocean Modelling","FirstCategoryId":"89","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S1463500325001209","RegionNum":3,"RegionCategory":"地球科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"METEOROLOGY & ATMOSPHERIC SCIENCES","Score":null,"Total":0}
引用次数: 0
Abstract
High-performance computing (HPC) limitations remain a significant bottleneck in the development of numerical models. Mixed-precision techniques, which reduce arithmetic precision to improve speed and memory efficiency, offer a promising solution. However, these methods inevitably introduce increased round-off errors that may destabilize model integrations and require smaller integration steps. This study investigates whether round-off error compensation methods can mitigate such precision-reduced errors. Three widely used methods are evaluated including Gill, Kahan, and Quasi Double-Precision (QDP) within shallow-water models. The suitability of using the double-precision fourth-order Runge-Kutta (RK4-DBL) method as a benchmark is first validated through idealized 1D linear shallow-water model experiments with known analytical solutions. Subsequently, ten perturbed initial-condition experiments are conducted for 2D nonlinear shallow-water model to assess the robustness of each compensation method relative to the RK4-DBL benchmark. When applied to fourth-order Runge-Kutta (RK4) in single precision (RK4-SGL), the Gill, Kahan and QDP methods reduce surface-height root-mean-square (RMSE) errors by approximately one order, four orders, and half an order of magnitude, respectively. In terms of computational cost, runtimes increased by 53%, 4%, and 7% relative to the double-precision reference, respectively. Among these compensation methods, the Kahan method achieves the best performance in both error compensation and computational efficiency, followed by the Gill method. The QDP method, though less effective than the other two, still provides meaningful improvements. Overall, this study demonstrates that these three round-off error compensation methods can improve the accuracy of mixed-precision numerical models while maintaining a reasonable computational cost.
期刊介绍:
The main objective of Ocean Modelling is to provide rapid communication between those interested in ocean modelling, whether through direct observation, or through analytical, numerical or laboratory models, and including interactions between physical and biogeochemical or biological phenomena. Because of the intimate links between ocean and atmosphere, involvement of scientists interested in influences of either medium on the other is welcome. The journal has a wide scope and includes ocean-atmosphere interaction in various forms as well as pure ocean results. In addition to primary peer-reviewed papers, the journal provides review papers, preliminary communications, and discussions.