先基于 cuda 编译ucx

再基于 ucx 编译 mpich

mkdir mpich
mkdir ucx


1, 安装 ucx


预备环境:

sudo apt-get install valgrind
sudo apt-get install libibverbs-dev librdmacm-dev

下载ucx 源代码

git clone --recursive https://github.com/openucx/ucx.git
cd ucx/
git checkout v1.16.0

生成configure脚本:

./autogen.sh && ./autogen.sh
mkdir build
cd build/

配置:

../contrib/configure-devel --with-cuda=/usr/local/cuda  --without-rocm  --prefix=$PWD/../../local-dbg-cuda

release:
 ../contrib/configure-opt --with-cuda=/usr/local/cuda   --prefix=$PWD/../../local-cuda

debug:
../contrib/configure-devel --with-cuda=/usr/local/cuda  --without-rocm  --prefix=$PWD/../../local-dbg-cuda

编译:


make -j
make install


    
2, 安装 mpich

下载源码:

 wget https://www.mpich.org/static/downloads/4.2.2/mpich-4.2.2.tar.gz
 tar zxf mpich-4.2.2.tar.gz

cd mpich-4.2.2/
 
配置:

./configure \
--prefix=/home/hipper/ex_mpich_2/local \
--enable-f90 \
--enable-cxx \
--enable-romio \
--enable-threads=multiple \
--with-ucx=/home/hipper/ex_mpich_2/ucx/local-dbg-cuda \
--with-ucx-lib=/home/hipper/ex_mpich_2/ucx/local-dbg-cuda/lib \
--with-ucx-include=/home/hipper/ex_mpich_2/ucx/local-dbg-cuda/include

结果:

编译:


make -j
make install

make 结束后:

make install结束后:

3,配置运行环境

未完待续。。。。

4,编译运行 app

Logo

欢迎来到FlagOS开发社区,这里是一个汇聚了AI开发者、数据科学家、机器学习爱好者以及业界专家的活力平台。我们致力于成为业内领先的Triton技术交流与应用分享的殿堂,为推动人工智能技术的普及与深化应用贡献力量。

更多推荐