蒙特卡罗粒子凝聚求解器接口设计:CPU/GPU超液滴法与PySDM的实例研究
On the design of Monte-Carlo particle coagulation solver interface: a CPU/GPU Super-Droplet Method case study with PySDM
摘要:
超液滴法(SDM)是一种粒子凝聚过程的概率Monte-Carlo模型,是Smoluchowski平均场公式的替代。SDM作为一种算法,其计算复杂度与状态向量长度成线性关系,状态向量长度在整个仿真过程中是恒定的,并且大多数算法步骤易于并行化。本文讨论了在PySDM中实现的SDM的两个数字运算后端的设计和实现,PySDM是一个新的免费开源Python软件包,用于模拟大气气溶胶,云和雨粒子的动态。这两个后端共享它们的应用程序编程接口(API),但利用不同的并行模式,针对不同的硬件,并构建在不同的低级例程集之上。First提供多线程CPU计算,基于Numba(使用Numpy数组)。Second提供GPU计算,并构建在ThrustRTC和CURandRTC之上(不使用Numpy数组)。在本文中,API讨论的重点是:跨步骤的数据依赖关系,并行化机会,CPU和GPU实现的细微差别,以及算法工作流程。示例模拟适用于验证API的实现。
英文摘要:
Super-Droplet Method (SDM) is a probabilistic Monte-Carlo-type model of particle coagulation process, an alternative to the mean-field formulation of Smoluchowski. SDM as an algorithm has linear computational complexity with respect to the state vector length, the state vector length is constant throughout simulation, and most of the algorithm steps are readily parallelizable. This paper discusses the design and implementation of two number-crunching backends for SDM implemented in PySDM, a new free and open-source Python package for simulating the dynamics of atmospheric aerosol, cloud and rain particles. The two backends share their application programming interface (API) but leverage distinct parallelism paradigms, target different hardware, and are built on top of different lower-level routine sets. First offers multi-threaded CPU computations and is based on Numba (using Numpy arrays). Second offers GPU computations and is built on top of ThrustRTC and CURandRTC (and does not use Numpy arrays). In the paper, the API is discussed focusing on: data dependencies across steps, parallelisation opportunities, CPU and GPU implementation nuances, and algorithm workflow. Example simulations suitable for validating implementations of the API are presented.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。