GPU-parallelized MATLAB software for atom-ion dynamics
收藏资源简介:
We present a MATLAB script, atomiongpu.m, which can use GPU parallelization to run several million independent simulations per day of a trapped ion interacting with a low-density cloud of atoms, calculating classical trajectories of a trapped ion and an atom starting far away. The script uses ode45gpu, which is our optimized and specialized implementation of the Runge-Kutta algorithm used in MATLAB’s ODE solver ode45. We first discuss the physical system and show how ode45gpu can, on a CPU, solve it about 7x faster than MATLAB’s ode45, leading to a 600x-3500x speedup when running a million trajectories using ode45gpu in parallel on a GPU compared to ode45 on a CPU. Then, we show how to easily modify the inputs to atomiongpu.m to account for different kinds of atoms, ions, atom-ion interactions, trap potentials, simulation parameters, initial conditions, and computational hardware, so that atomiongpu.m automatically finds the probability of complex formation, the distribution of observables such as the scattering angle and complex lifetime, and plots of specific trajectories.
本文展示了一款MATLAB脚本atomiongpu.m,其可借助图形处理器(Graphics Processing Unit, GPU)并行运算,每日可完成数百万次独立模拟:模拟被囚禁离子与低密度原子云的相互作用,并计算初始间距较远的被囚禁离子与原子的经典运动轨迹。该脚本采用ode45gpu,这是我们针对MATLAB常微分方程(Ordinary Differential Equation, ODE)求解器ode45所使用的龙格-库塔(Runge-Kutta)算法进行优化定制的实现版本。我们首先讨论该物理系统,并展示ode45gpu在中央处理器(Central Processing Unit, CPU)上的求解速度相较MATLAB原生ode45提升约7倍;而当借助GPU并行运行百万条轨迹时,相较于CPU上运行ode45的情况,ode45gpu可实现600倍至3500倍的加速比。随后,我们将演示如何便捷修改atomiongpu.m的输入参数,以适配不同种类的原子、离子、原子-离子相互作用、囚禁势场、模拟参数、初始条件以及计算硬件;最终atomiongpu.m可自动输出复合形成概率、散射角与复合寿命等可观测量的分布,以及特定轨迹的绘图结果。




