The official C++ MPI bindings were removed from the standard in 2008, leaving a gap that numerous third-party libraries have attempted to fill. However, existing wrappers typically cover only a limited subset of MPI or target specific use cases, falling short of a general-purpose solution. A recent conceptual paper proposed general design principles for modern C++ bindings based on C++20 concepts, without committing to a concrete interface. We present the first concrete realization of these principles in a layered architecture. At the foundation, we define a core layer: refined C++20 concepts formalizing the MPI standard's notion of data buffers, automatic mapping of standard C++ constructs, non-intrusive customization points for third-party types, and concept-based wrappers for MPI procedures. The result is a low-level native C++ MPI interface that works directly with STL containers, is highly extensible, and lends itself to standardization. Built on this core, we present KaMPIng-v2 -- a C++ MPI library offering the convenience and memory-safety of KaMPIng with composable, pipe-based syntax inspired by C++ ranges for efficient, boilerplate-free MPI programming. Finally, we demonstrate the core layer's broad applicability by designing lightweight adapters for GPU and performance-portability libraries, making the HPC ecosystem a first-class citizen in MPI. Kokkos views, Thrust device vectors, and SYCL buffers can be passed directly to MPI procedures, with adapter logic remaining self-contained. All contributions are backed by a fully functional open-source reference implementation, demonstrating the practical viability of the proposed design.


翻译:官方C++ MPI绑定于2008年从标准中移除,留下了众多第三方库试图填补的空白。然而,现有封装通常仅覆盖MPI的有限子集或针对特定用例,未能成为通用解决方案。近期一篇概念性论文提出了基于C++20概念实现现代C++绑定的通用设计原则,但未承诺具体接口。我们首次在分层架构中实现了这些原则的具体化。在底层,我们定义了一个核心层:通过精炼的C++20概念形式化MPI标准对数据缓冲区的定义、标准C++构造的自动映射、第三方类型的非侵入式定制点,以及基于概念的MPI过程封装。这产生了一个低层原生C++ MPI接口,可直接处理STL容器,具有高度可扩展性,并适合标准化。在此基础上,我们构建了KaMPIng-v2——一个C++ MPI库,在提供KaMPIng便利性与内存安全性的同时,采用受C++ ranges启发的可组合流水线式语法,实现高效、无模板代码的MPI编程。最后,我们通过为GPU和性能可移植性库设计轻量级适配器,展示了核心层的广泛适用性,使HPC生态系统成为MPI中的一等公民。Kokkos视图、Thrust设备向量和SYCL缓冲区可直接传递给MPI过程,且适配器逻辑保持自包含。所有贡献均基于功能完善的开源参考实现,论证了所提出设计的实际可行性。

0
下载
关闭预览

相关内容

设计是对现有状的一种重新认识和打破重组的过程,设计让一切变得更美。
《物联网参考体系结构》国家标准
专知会员服务
30+阅读 · 2024年6月22日
国家标准《信息技术云计算参考架构》
专知会员服务
37+阅读 · 2024年5月24日
专知会员服务
161+阅读 · 2021年3月6日
专知会员服务
38+阅读 · 2020年10月29日
【2020新书】现代C++初学者指南,301页pdf
专知会员服务
163+阅读 · 2020年7月24日
【2020新书】C++20 特性 第二版,A Problem-Solution Approach
专知会员服务
60+阅读 · 2020年4月26日
《“边缘计算+”技术白皮书》,82页pdf
专知
11+阅读 · 2022年8月28日
82页《现代C++教程》:高速上手C++ 11/14/17/20
专知
21+阅读 · 2020年10月19日
【数字孪生】数字孪生技术从概念到应用
产业智能官
95+阅读 · 2020年2月16日
AAAI 2020 | 多模态基准指导的生成式多模态自动文摘
AI科技评论
16+阅读 · 2020年1月5日
【HPC】HPC高性能计算知识: 主要应用场景和软件
产业智能官
22+阅读 · 2019年3月27日
【CPS】社会物理信息系统(CPSS)及其典型应用
产业智能官
16+阅读 · 2018年9月18日
并行算法演进,从MapReduce到MPI
凡人机器学习
10+阅读 · 2017年11月5日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
13+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
《无人机对海面作战影响评估》
专知会员服务
10+阅读 · 7月21日
印度精确打击与指挥架构的断层
专知会员服务
5+阅读 · 7月20日
美空军AI完成F-16战斗机自主空战历史性试飞
专知会员服务
6+阅读 · 7月20日
深入Project Maven:为何人工智能在战场上依然失灵
锻造未来士兵:外骨骼、基因工程与赛博格
专知会员服务
8+阅读 · 7月19日
相关资讯
《“边缘计算+”技术白皮书》,82页pdf
专知
11+阅读 · 2022年8月28日
82页《现代C++教程》:高速上手C++ 11/14/17/20
专知
21+阅读 · 2020年10月19日
【数字孪生】数字孪生技术从概念到应用
产业智能官
95+阅读 · 2020年2月16日
AAAI 2020 | 多模态基准指导的生成式多模态自动文摘
AI科技评论
16+阅读 · 2020年1月5日
【HPC】HPC高性能计算知识: 主要应用场景和软件
产业智能官
22+阅读 · 2019年3月27日
【CPS】社会物理信息系统(CPSS)及其典型应用
产业智能官
16+阅读 · 2018年9月18日
并行算法演进,从MapReduce到MPI
凡人机器学习
10+阅读 · 2017年11月5日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
13+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员