M. D. E. Szyndel, Christopher Lemon, Daniel de Brito Dias, Eamon Dodds, Eduard Khramchenkov, Simone Rinco, Soham Sheth, M. Tene, Choongyong Han, Xundan Shi, Christian Wolfsteiner, H. Cao, Terrence Liao, Michael Sekachev, Rustem Zaydullin
{"title":"Implementing a Hardware Agnostic Commercial Black-Oil Reservoir Simulator","authors":"M. D. E. Szyndel, Christopher Lemon, Daniel de Brito Dias, Eamon Dodds, Eduard Khramchenkov, Simone Rinco, Soham Sheth, M. Tene, Choongyong Han, Xundan Shi, Christian Wolfsteiner, H. Cao, Terrence Liao, Michael Sekachev, Rustem Zaydullin","doi":"10.2118/212205-ms","DOIUrl":null,"url":null,"abstract":"\n Commercial reservoir simulators have traditionally been optimized for parallel computations on central processing units (CPUs). The recent advances in general-purpose graphics processing units (GPUs) have provided a powerful alternative to CPU, presenting an opportunity to significantly reduce run times for simulations. Realizing peak performance on GPU requires that GPU-specific code be written, and also requires that data are laid out sympathetically to the hardware. The cost of copying data between the CPU memory and GPU memory at the time of this writing is egregious. Peak performance will only be realized if this is minimized.\n In paper Cao et al., 2021, the authors establish approaches to enable a simulator to give excellent performance on a CPU or GPU, with the same simulation result using either hardware. We discuss how their prototype was generalized into high-quality, maintainable code with applicability across a wide range of models.\n Different parts of a reservoir simulator benefit from different approaches. A modern, object-oriented simulator requires components to handle initialization, property calculation, linearization, linear solver, well and aquifer calculations, field management, and reporting. Each of these areas will present architectural challenges when broadening the scope of the simulator from CPU only to supporting CPU or GPU. We outline these challenges and present the approaches taken to address them. In particular, we discuss the importance of abstracting compute scheduling, testing methods, data storage classes, and associated memory management to a generic framework layer.\n We have created a high-quality reservoir simulator with the capacity to run on a CPU or GPU with results that match to within a very small tolerance. We present software engineering approaches that enable the team to achieve and maintain this in the future. In addition, we present test outcomes and discuss how to achieve excellent performance.\n To our knowledge, no simulator capable of both CPU simulation and full GPU simulation (meaning simulation with no copies of full grid-size data for purposes other than reporting) has been presented. We will present novel software approaches used to implement the first such commercial simulator.","PeriodicalId":225811,"journal":{"name":"Day 1 Tue, March 28, 2023","volume":"27 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2023-03-21","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Day 1 Tue, March 28, 2023","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.2118/212205-ms","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
Commercial reservoir simulators have traditionally been optimized for parallel computations on central processing units (CPUs). The recent advances in general-purpose graphics processing units (GPUs) have provided a powerful alternative to CPU, presenting an opportunity to significantly reduce run times for simulations. Realizing peak performance on GPU requires that GPU-specific code be written, and also requires that data are laid out sympathetically to the hardware. The cost of copying data between the CPU memory and GPU memory at the time of this writing is egregious. Peak performance will only be realized if this is minimized.
In paper Cao et al., 2021, the authors establish approaches to enable a simulator to give excellent performance on a CPU or GPU, with the same simulation result using either hardware. We discuss how their prototype was generalized into high-quality, maintainable code with applicability across a wide range of models.
Different parts of a reservoir simulator benefit from different approaches. A modern, object-oriented simulator requires components to handle initialization, property calculation, linearization, linear solver, well and aquifer calculations, field management, and reporting. Each of these areas will present architectural challenges when broadening the scope of the simulator from CPU only to supporting CPU or GPU. We outline these challenges and present the approaches taken to address them. In particular, we discuss the importance of abstracting compute scheduling, testing methods, data storage classes, and associated memory management to a generic framework layer.
We have created a high-quality reservoir simulator with the capacity to run on a CPU or GPU with results that match to within a very small tolerance. We present software engineering approaches that enable the team to achieve and maintain this in the future. In addition, we present test outcomes and discuss how to achieve excellent performance.
To our knowledge, no simulator capable of both CPU simulation and full GPU simulation (meaning simulation with no copies of full grid-size data for purposes other than reporting) has been presented. We will present novel software approaches used to implement the first such commercial simulator.
商业油藏模拟器传统上是针对中央处理器(cpu)上的并行计算进行优化的。通用图形处理单元(gpu)的最新进展为CPU提供了一个强大的替代方案,提供了一个显著减少模拟运行时间的机会。在GPU上实现峰值性能需要编写特定于GPU的代码,还需要将数据与硬件一致地布局。在撰写本文时,在CPU内存和GPU内存之间复制数据的成本非常高。只有将其最小化,才能实现最佳性能。在论文Cao et al., 2021中,作者建立了使模拟器在CPU或GPU上提供出色性能的方法,并且使用任何硬件都具有相同的仿真结果。我们讨论了他们的原型是如何被推广成高质量的、可维护的、适用于各种模型的代码的。油藏模拟器的不同部分受益于不同的方法。一个现代的、面向对象的模拟器需要组件来处理初始化、属性计算、线性化、线性求解器、井和含水层计算、油田管理和报告。当将模拟器的范围从仅CPU扩展到支持CPU或GPU时,这些领域中的每一个都将呈现架构挑战。我们概述了这些挑战,并提出了解决这些挑战的方法。我们特别讨论了将计算调度、测试方法、数据存储类和相关内存管理抽象到通用框架层的重要性。我们已经创建了一个高质量的水库模拟器,能够在CPU或GPU上运行,结果匹配在一个非常小的公差范围内。我们提出了软件工程方法,使团队能够在将来实现并维护这一目标。此外,我们还介绍了测试结果,并讨论了如何实现优异的性能。据我们所知,目前还没有能够同时进行CPU模拟和完整GPU模拟的模拟器(即除了报告之外没有完整网格大小数据副本的模拟)。我们将介绍用于实现第一个这样的商业模拟器的新颖软件方法。