We present a distributed algebra system for efficient and compact implementation of numerical time integration schemes on parallel computers and graphics processing units (GPU). The software implementation combines the time integration library Odeint from Boost with the OpenFPM framework for scalable scientific computing. Implementing multi-stage, multi-step, or adaptive time integration methods in distributed-memory parallel codes or on GPUs is challenging. The present algebra system addresses this by making the time integration methods from Odeint available in a concise template-expression language for numerical simulations distributed and parallelized using OpenFPM. This allows using state-of-the-art time integration schemes, or switching between schemes, by changing one line of code, while maintaining parallel scalability. This enables scalable time integration with compact code and facilitates rapid rewriting and deployment of simulation algorithms. We benchmark the present software for exponential and sigmoidal dynamics and present an application example to the 3D Gray-Scott reaction-diffusion problem on both CPUs and GPUs in only 60 lines of code.
翻译:我们提出了一种分布式代数系统,用于在并行计算机和图形处理单元(GPU)上高效且紧凑地实现数值时间积分方案。该软件实现将Boost库中的时间积分库Odeint与面向可扩展科学计算的OpenFPM框架相结合。在分布式内存并行代码或GPU上实现多级、多步或自适应时间积分方法颇具挑战性。本文提出的代数系统通过将Odeint中的时间积分方法以简洁的模板表达式语言形式呈现,使其可用于通过OpenFPM进行分布式和并行化的数值模拟,从而解决了这一问题。这使得用户能够使用最先进的时间积分方案,或通过更改一行代码在不同方案间切换,同时保持并行可扩展性。该方案实现了紧凑代码下的可扩展时间积分,便于模拟算法的快速重写与部署。我们以指数型与S型动力学为基准测试了当前软件,并展示了其在CPU和GPU上仅用60行代码求解三维Gray-Scott反应扩散问题的应用实例。