...
首页> 外文期刊>Geoscientific Model Development Discussions >How to use mixed precision in ocean models: exploring a potential reduction of numerical precision in NEMO 4.0 and ROMS 3.6
【24h】

How to use mixed precision in ocean models: exploring a potential reduction of numerical precision in NEMO 4.0 and ROMS 3.6

机译:如何在海洋模型中使用混合精度:探索Nemo 4.0和Roms 3.6中的数值精度潜在降低

获取原文
           

摘要

Mixed-precision approaches can provide substantial speed-ups for both computing- and memory-bound codes with little effort. Most scientific codes have overengineered the numerical precision, leading to a situation in which models are using more resources than required without knowing where they are required and where they are not. Consequently, it is possible to improve computational performance by establishing a more appropriate choice of precision. The only input that is needed is a method to determine which real variables can be represented with fewer bits without affecting the accuracy of the results. This paper presents a novel method that enables modern and legacy codes to benefit from a reduction of the precision of certain variables without sacrificing accuracy. It consists of a simple idea: we reduce the precision of a group of variables and measure how it affects the outputs. Then we can evaluate the level of precision that they truly need. Modifying and recompiling the code for each case that has to be evaluated would require a prohibitive amount of effort. Instead, the method presented in this paper relies on the use of a tool called a reduced-precision emulator (RPE) that can significantly streamline the process. Using the RPE and a list of parameters containing the precisions that will be used for each real variable in the code, it is possible within a single binary to emulate the effect on the outputs of a specific choice of precision. When we are able to emulate the effects of reduced precision, we can proceed with the design of the tests that will give us knowledge of the sensitivity of the model variables regarding their numerical precision. The number of possible combinations is prohibitively large and therefore impossible to explore. The alternative of performing a screening of the variables individually can provide certain insight about the required precision of variables, but, on the other hand, other complex interactions that involve several variables may remain hidden. Instead, we use a divide-and-conquer algorithm that identifies the parts that require high precision and establishes a set of variables that can handle reduced precision. This method has been tested using two state-of-the-art ocean models, the Nucleus for European Modelling of the Ocean (NEMO) and the Regional Ocean Modeling System (ROMS), with very promising results. Obtaining this information is crucial to build an actual mixed-precision version of the code in the next phase that will bring the promised performance benefits.
机译:混合精密方法可以为计算和内存绑定代码提供大量速度,几乎没有努力。大多数科学代码具有超始终的数值精度,导致模型使用更多资源的情况而不是所需的资源,而不知道它们是必需的,并且在那里它们不是。因此,可以通过建立更适当的精度选择来改善计算性能。所需的唯一输入是确定可以使用较少比特表示的真实变量的方法,而不会影响结果的准确性。本文提出了一种新的方法,使现代和传统代码能够从某些变量的精度降低,而不会牺牲精度。它包括一个简单的想法:我们减少了一组变量的精度,并测量它如何影响输出。然后我们可以评估他们真正需要的精确度。修改和重新编译用于必须评估的每种情况的代码需要禁止的努力。相反,本文所呈现的方法依赖于使用称为降低精密仿真器(RPE)的工具,其可以显着地简化该过程。使用RPE和包含将在代码中的每个真实变量用于每个真实变量的诊断的参数列表,可以在单个二进制中仿真对特定精度选择的输出的影响。当我们能够模拟精度降低的影响时,我们可以继续进行测试,这些测试将为我们了解模型变量对其数值精度的敏感性。可能的组合的数量非常大,因此无法探索。替代地执行变量的筛选可以单独提供关于变量所需精度的某些洞察力,而是另一方面,涉及若干变量的其他复杂交互可以保持隐藏。相反,我们使用划分和征服算法,该算法标识需要高精度的部件,并建立一组可以处理降低精度的变量。这种方法已经使用了两个最先进的海洋模型,欧洲建模的核心(Nemo)和区域海洋建模系统(ROM)的核心,具有非常有前途的结果。获取此信息对于在下一阶段构建实际混合精密版本,将带来承诺的性能效益的实际混合精密版本至关重要。

著录项

获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号