gcc -v
回显信息显示如下表示GCC 9.3.0已安装:
gcc version 9.3.0(GCC);
libtool --version
回显信息显示如下表示libtool 2.4.2已安装:
libtool (GNU libtool) 2.4.2
Hyper MPI包含Hyper MPI和HUCX两个软件层,其中Hyper MPI的安装依赖于HUCX,编译时应先编译HUCX。
下载地址:https://github.com/kunpengcompute/hucx/archive/refs/tags/v1.1.0-huawei.tar.gz。
下载地址: https://github.com/kunpengcompute/xucg/archive/refs/tags/v1.1.0-huawei.tar.gz。
tar -zxvf hucx-1.1.0-huawei.tar.gz
tar -zxvf xucg-1.1.0-huawei.tar.gz
cp -r xucg-1.1.0-huawei/* hucx-1.1.0-huawei/src/ucg
cd hucx-1.1.0-huawei/
./contrib/configure-opt --prefix=/path/to/install/hucx
make -j32
make -j32 install
make后面-j参数为并行编译参数,表示有多少CPU核数参与编译过程,请根据实际CPU核数进行指定。
下载地址: https://github.com/kunpengcompute/hmpi/archive/refs/tags/v1.1.0-huawei.tar.gz
cd hmpi-1.1.0-huawei/
./autogen.pl
./configure --prefix=/path/to/install/hmpi --with-platform=contrib/platform/mellanox/optimized --enable-mpi1-compatibility --with-ucx=/path/to/install/hucx
make
make install
可通过environment-modules工具和写入“~/.bashrc”文件两种方式配置环境变量。
vi /path/to/install/Hmpi_modulefiles
#%Module1.0 # HMPI module for use with 'environment-modules' package: conflict mpi prepend-path OPAL_PREFIX /path/to/install/hmpi/ prepend-path PATH /path/to/install/hmpi/bin:/path/to/install/hucx/bin prepend-path LD_LIBRARY_PATH /path/to/install/hmpi/lib:/path/to/install/hucx/lib prepend-path INCLUDE /path/to/install/hmpi/include
/path/to/install:表示environment-modules工具的安装路径。用户若不指定安装路径,则默认安装在“/usr/share/Modules/modulefiles”路径下。
module load /path/to/install/Hmpi_modulefiles
vi ~/.bashrc
module use /path/to/install module load /path/to/install/Hmpi_modulefiles
export PATH=/path/to/install/hmpi/bin:/path/to/install/hucx/bin:$PATH
export OPAL_PREFIX=/path/to/install/hmpi/
export LD_LIBRARY_PATH=/path/to/install/hmpi/lib:/path/to/install/hucx/lib:$LD_LIBRARY_PATH
配置环境变量主要是将HUCX和Hyper MPI加入到PATH和LD_LIBRARY_PATH中。