一个超大规模、高性能且模块化的基于智能体仿真平台的设计与分析
Design and Analysis of an Extreme-Scale, High-Performance, and Modular Agent-Based Simulation Platform
AI总结:
本文设计模块化智能体仿真平台 BioDynaMo,并通过共享内存优化与分布式引擎 TeraAgent 实现5000亿智能体、84096核扩展。
摘要:
基于智能体的建模对于研究众多领域中的复杂系统不可或缺。然而,现有仿真平台存在两大问题:性能和模块化。低性能阻碍了包含大量智能体的仿真,增加了开发时间,限制了参数探索,并提高了计算成本。不灵活的软件设计促使建模者创建自己的工具,从而分散了宝贵资源。本论文介绍了一个名为 BioDynaMo 的新型仿真平台及其重大改进 TeraAgent,通过三项主要工作来缓解这些挑战。首先,我们通过定义抽象、建立软件基础设施并实现大量用于基于智能体建模的功能,奠定该平台的基础。我们通过神经科学、流行病学和肿瘤学中的用例展示 BioDynaMo 的模块化。我们验证这些模型,并展示只需少量代码即可添加新功能的简便性。其次,我们进行严格的性能分析,并识别共享内存并行化面临的挑战。所提供的解决方案包括用于邻居搜索的优化网格、降低内存访问延迟的机制,以及利用领域知识省略不必要的工作。这些改进带来最高三个数量级的加速,使在单台服务器上仿真17亿个智能体成为可能。第三,我们提出 TeraAgent,这是一个分布式仿真引擎,允许将一次仿真的计算横向扩展到多台服务器。我们识别并解决服务器通信瓶颈,并实现序列化和增量编码方案,以加速并减少数据传输。TeraAgent 能够仿真5000亿个智能体,并可扩展至84096个CPU核心。BioDynaMo 已被广泛采用,其中包括一个获奖的放射治疗仿真,该仿真被评为2024年物理学十大突破之一。
英文摘要:
Agent-based modeling is indispensable for studying complex systems across many domains. However, existing simulation platforms exhibit two major issues: performance and modularity. Low performance prevents simulations with a large number of agents, increases development time, limits parameter exploration, and raises computing costs. Inflexible software designs motivate modelers to create their own tools, diverting valuable resources. This dissertation introduces a novel simulation platform called BioDynaMo and its significant improvement, TeraAgent, to alleviate these challenges via three major works. First, we lay the platform's foundation by defining abstractions, establishing software infrastructure, and implementing a multitude of features for agent-based modeling. We demonstrate BioDynaMo's modularity through use cases in neuroscience, epidemiology, and oncology. We validate these models and show the simplicity of adding new functionality with few lines of code. Second, we perform a rigorous performance analysis and identify challenges for shared-memory parallelism. Provided solutions include an optimized grid for neighbor searching, mechanisms to reduce the memory access latency, and exploiting domain knowledge to omit unnecessary work. These improvements yield up to three orders of magnitude speedups, enabling simulations of 1.7 billion agents on a single server. Third, we present TeraAgent, a distributed simulation engine that allows scaling out the computation of one simulation to multiple servers. We identify and address server communication bottlenecks and implement solutions for serialization and delta encoding to accelerate and reduce data transfer. TeraAgent can simulate 500 billion agents and scales to 84096 CPU cores. BioDynaMo has been widely adopted, including a prize-winning radiotherapy simulation recognized as a top 10 breakthrough in physics in 2024.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。