openucx/ucx

GitHub: openucx/ucx

生产级高性能通信框架,为现代高带宽低延迟网络提供统一的抽象通信原语和硬件加速支持。

Stars: 1603 | Forks: 538


follow on Twitter Documentation Status

# Unified Communication X Unified Communication X (UCX) 是一个 [屡获殊荣](https://losalamosreporter.com/2019/11/07/nine-los-alamos-national-laboratory-projects-win-rd-100-awards)、 经过优化的、生产级验证的通信框架,专为现代、高带宽 和低延迟网络而设计。 UCX 公开了一组抽象通信原语,充分利用 可用的硬件资源和卸载能力。其中包括 RDMA (InfiniBand 和 RoCE)、 TCP、GPU、共享内存和网络原子操作。 请访问我们的[文档站点](https://openucx.readthedocs.io/en/master) 以获取更多详细信息。 请查看我们的[“成员自愿共识标准”](https://ucfconsortium.org/policy/) 和 [“出口合规贡献提交”](https://ucfconsortium.org/policy/) 政策。
* [使用 UCX](#using-ucx) * [已知问题](#known-issues) * [架构](#architecture) * [支持的传输方式](#supported-transports) * [支持的 CPU 架构](#supported-cpu-architectures) * [许可证](#licenses) * [我们的社区](#our-community) * [贡献者协议与指南](#contributor-agreement-and-guidelines) * [出版物](#publications)
## 使用 UCX ### 正式版构建 构建 UCX 通常包括运行 "configure" 和 "make"。 如果使用正式发布包,请执行以下命令,从树顶层的目录中安装 UCX 系统: ``` $ ./contrib/configure-release --prefix=/where/to/install $ make -j8 $ make install ``` 如果直接克隆 git 仓库,请使用: ``` $ ./autogen.sh $ ./contrib/configure-release --prefix=/where/to/install $ make -j8 $ make install ``` 注意:编译对各种网络或其他特定硬件的支持可能 需要在运行 configure 时添加额外的命令行标志。 ### 开发者构建 ``` $ ./autogen.sh $ ./contrib/configure-devel --prefix=$PWD/install-debug ``` *** 注意:UCX 的开发者构建通常在运行时包含较大的 性能损耗,因为包含额外的调试代码。 ### 构建 RPM 包 ``` $ contrib/buildrpm.sh -s -b ``` ### 构建 DEB 包 ``` $ dpkg-buildpackage -us -uc ``` ### 构建 Doxygen 文档 ``` $ make docs ``` ### 使用 UCX 安装 OpenMPI 和 OpenSHMEM [Wiki 页面](http://github.com/openucx/ucx/wiki/OpenMPI-and-OpenSHMEM-installation-with-UCX) ### 使用 UCX 安装 MPICH [Wiki 页面](http://github.com/openucx/ucx/wiki/MPICH-installation-with-UCX) ### UCX 性能测试 启动服务器: ``` $ ./src/tools/perf/ucx_perftest -c 0 ``` 连接客户端: ``` $ ./src/tools/perf/ucx_perftest -t tag_lat -c 1 ``` ### 运行内部单元测试 ``` $ make -C test/gtest test ```
## 已知问题 * UCX 1.8.0 版本存在一个错误,当 TCP 传输与共享内存传输结合使用时,可能导致数据损坏。建议升级到 UCX 1.9.0 及更高版本。1.8.0 之前发布的 UCX 版本没有此错误。 * 由于 pthread_rwlock 函数中的已知错误,UCX 可能会在 glibc 2.25-2.29 版本下挂起。当发生此类挂起时,即使没有其他线程持有锁,其中一个 UCX 线程也会卡在 pthread_rwlock_rdlock(由 ucs_rcache_get 调用)中。相关问题已报告在 [glibc Bug 23844](https://sourceware.org/bugzilla/show_bug.cgi?id=23844)。 如果发生此问题,建议使用您的操作系统发行版提供的 glibc 版本,或者使用低于 2.25 或高于 2.29 的版本从源代码构建 glibc。 * 由于 UCX 与 rdma-core v22 一起使用时的兼容性缺陷,不支持设置 UCX_DC_MLX5_RX_INLINE=0,这将导致 DC 传输不可用。 此问题已在 rdma-core v24 中修复,并反向移植到 rdma-core-22.4-2.el7 rpm。 有关更多详细信息,请参阅 [ucx issue 5749](https://github.com/openucx/ucx/issues/5749)。 * 如果网络路由识别错误,导致对等体被报告为“不可达”,请通过设置以下内容更改默认的可达性检查模式: UCX_IB_ROCE_REACHABILITY_MODE=all。
## 架构 ![](https://static.pigsec.cn/wp-content/uploads/repos/2026/04/aad4f41190100408.png) | 组件 | 角色 | 描述 | | :---: | :---: | --- | | UCP | 协议 | 实现高级抽象,例如标签匹配、流、连接协商和建立、多轨道以及处理不同的内存类型 | | UCT | 传输 | 实现低级通信原语,例如主动消息、远程内存访问和原子操作 | | UCS | 服务 | 用于通用用途的数据结构、算法和系统工具集合 | | UCM | 内存 | 拦截内存分配和释放事件,供内存注册缓存使用 |
## 支持的传输方式 * [Infiniband](https://www.infinibandta.org/) * [Omni-Path](https://www.intel.com/content/www/us/en/high-performance-computing-fabrics/omni-path-driving-exascale-computing.html) * [RoCE](http://www.roceinitiative.org/) * [Cray Gemini 和 Aries](https://www.cray.com/) * [CUDA](https://developer.nvidia.com/cuda-zone) * [ROCm](https://rocm.docs.amd.com/) * 共享内存 * posix, sysv, [cma](https://dl.acm.org/citation.cfm?id=2616532), [knem](http://knem.gforge.inria.fr/), 和 [xpmem](https://github.com/openucx/xpmem) * TCP/IP **注意:** UCX >= 1.12.0 需要 rdma-core >= 28.0 或 MLNX_OFED >= 5.0 才能支持 [Infiniband](https://www.infinibandta.org/) 和 [RoCE](http://www.roceinitiative.org/) 传输。
## 支持的 CPU 架构 * [x86_64](https://en.wikipedia.org/wiki/X86-64) * [Power8/9](https://www.ibm.com/support/knowledgecenter/en/POWER9/p9hdx/POWER9welcome.htm) * [Arm v8](https://www.arm.com/products/silicon-ip-cpu)
## 许可证 UCX 根据以下许可证授权: * [BSD3](LICENSE)
## 我们的社区 * [项目网站](http://www.openucx.org/) * [ReadTheDocs](https://openucx.readthedocs.io/en/master/) * [Github](http://www.github.com/openucx/ucx/) * [软件发布](http://www.github.com/openucx/ucx/releases) * [邮件列表](https://elist.ornl.gov/mailman/listinfo/ucx-group) * [Twitter](https://twitter.com/openucx)
## 贡献者协议与指南 为了向 UCX 做贡献,请签署相应的 [贡献者协议](http://www.openucx.org/license/)。 所有贡献者必须遵守[“成员自愿 共识标准”](https://ucfconsortium.org/policy/) 和 [“出口合规 贡献提交”](https://ucfconsortium.org/policy/) 政策。 在提交贡献和更改时,请遵循这些 [说明](https://github.com/openucx/ucx/wiki/Guidance-for-contributors)。 ## 出版物 若要在出版物中引用 UCX,请使用以下条目: ``` @inproceedings{shamis2015ucx, title={UCX: an open source framework for HPC network APIs and beyond}, author={Shamis, Pavel and Venkata, Manjunath Gorentla and Lopez, M Graham and Baker, Matthew B and Hernandez, Oscar and Itigin, Yossi and Dubman, Mike and Shainer, Gilad and Graham, Richard L and Liss, Liran and others}, booktitle={2015 IEEE 23rd Annual Symposium on High-Performance Interconnects}, pages={40--43}, year={2015}, organization={IEEE} } ``` 引用 UCX 网站: ``` @misc{openucx-website, title = {{The Unified Communication X Library}}, key = {{{The Unified Communication X Library}}, howpublished = {{\url{http://www.openucx.org}}} } ```
标签:API, CUDA, HPC, InfiniBand, OpenMPI, RDMA, RoCE, TCP, UML, Vectored Exception Handling, 低延迟, 共享内存, 分布式系统, 响应大小分析, 客户端加密, 并发处理, 开源库, 搜索引擎爬虫, 数据传输, 深度学习互连, 网络原子操作, 通信框架, 高带宽, 高性能计算