1.软件包编译
Hyper MPI包含ompi和ucx两个软件层,其中ompi的安装依赖于ucx,编译时应先编译ucx。
1.1 ucx编译
从https://github.com/kunpengcompute/hucx 获取hucx源码包,请注意下载huawei分支的源码。

从https://github.com/kunpengcompute/xucg/tree/huawei 获取uxcg源码包,请注意下载huawei分支的源码。

将两个源码包上传至服务器,例如“/where/to/download/ucx”目录。
执行如下命令,进入源码包路径。
cd /where/to/download/ucx
说明:/where/to/download/ucx:代表ucx源码包上传后的存放路径
执行如下命令,解压软件包。
unzip hucx-huawei.zip
unzip xucg-huawei.zip
6. 执行如下命令,拷贝xucg代码到ucx目录下
cp -r xucg-huawei/* hucx-huawei/src/ucg/
7. 执行如下命令,进入autogen.sh脚本所在目录。
cd hucx-huawei/
8. 执行如下命令,进行源码包安装。
./autogen.sh
./contrib/configure-opt --prefix=/where/to/install/ucx
说明:环境上若没有安装numactl插件,则需要执行如下命令,指定--disable-numa参数:
./contrib/configure-opt --prefix=/where/to/install/ucx --disable-numa
make -j32
make -j32 install
须知:make后面-j参数是并行编译参数,指的是有多少CPU核心参与编译过程,需用户根据实际CPU核数进行指定。
1.2 ompi编译
从https://github.com/kunpengcompute/hmpi获取hmpi源码包,请注意下载huawei分支的源码。

将源码包上传至服务器,例如“/where/to/download/ompi”目录。
执行如下命令,进入源码包路径。
cd /where/to/download/ompi
说明:/where/to/download/ompi:代表ompi源码包上传后的存放路径。
执行如下命令,解压软件包。
unzip hmpi-huawei.zip
5. 执行如下命令,进入autogen.pl脚本所在目录。
cd hmpi-huawei/
6. 执行如下命令,进行源码包安装。
./autogen.pl
./configure --prefix=/where/to/install/ompi --with-platform=contrib/platform/mellanox/optimized --enable-mpi1-compatibility --with-ucx=/where/to/install/ucx
make
make install
2 配置环境变量
配置环境变量主要是将hucx和hmpi加入到PATH和LD_LIBRARY_PATH中,以下的方式只会临时生效,如果要永久生效可以将以下命令添加到~/.bashrc文件中:
export PATH=/where/to/install/ompi/bin:/where/to/install/ucx/bin:$PATH
export LD_LIBRARY_PATH=/where/to/install/ompi/lib:/where/to/install/ucx/lib:$LD_LIBRARY_PATH
1.软件包编译
Hyper MPI包含ompi和ucx两个软件层,其中ompi的安装依赖于ucx,编译时应先编译ucx。
1.1 ucx编译
从https://github.com/kunpengcompute/hucx 获取hucx源码包,请注意下载huawei分支的源码。
从https://github.com/kunpengcompute/xucg/tree/huawei 获取uxcg源码包,请注意下载huawei分支的源码。
将两个源码包上传至服务器,例如“/where/to/download/ucx”目录。
执行如下命令,进入源码包路径。
cd /where/to/download/ucx
说明:/where/to/download/ucx:代表ucx源码包上传后的存放路径
执行如下命令,解压软件包。
unzip hucx-huawei.zip
unzip xucg-huawei.zip
6. 执行如下命令,拷贝xucg代码到ucx目录下
cp -r xucg-huawei/* hucx-huawei/src/ucg/
7. 执行如下命令,进入autogen.sh脚本所在目录。
cd hucx-huawei/
8. 执行如下命令,进行源码包安装。
./autogen.sh
./contrib/configure-opt --prefix=/where/to/install/ucx
说明:环境上若没有安装numactl插件,则需要执行如下命令,指定--disable-numa参数:
./contrib/configure-opt --prefix=/where/to/install/ucx --disable-numa
make -j32
make -j32 install
须知:make后面-j参数是并行编译参数,指的是有多少CPU核心参与编译过程,需用户根据实际CPU核数进行指定。
1.2 ompi编译
从https://github.com/kunpengcompute/hmpi获取hmpi源码包,请注意下载huawei分支的源码。
将源码包上传至服务器,例如“/where/to/download/ompi”目录。
执行如下命令,进入源码包路径。
cd /where/to/download/ompi
说明:/where/to/download/ompi:代表ompi源码包上传后的存放路径。
执行如下命令,解压软件包。
unzip hmpi-huawei.zip
5. 执行如下命令,进入autogen.pl脚本所在目录。
cd hmpi-huawei/
6. 执行如下命令,进行源码包安装。
./autogen.pl
./configure --prefix=/where/to/install/ompi --with-platform=contrib/platform/mellanox/optimized --enable-mpi1-compatibility --with-ucx=/where/to/install/ucx
make
make install
2 配置环境变量
配置环境变量主要是将hucx和hmpi加入到PATH和LD_LIBRARY_PATH中,以下的方式只会临时生效,如果要永久生效可以将以下命令添加到~/.bashrc文件中:
export PATH=/where/to/install/ompi/bin:/where/to/install/ucx/bin:$PATH
export LD_LIBRARY_PATH=/where/to/install/ompi/lib:/where/to/install/ucx/lib:$LD_LIBRARY_PATH