diff --git a/ManufacturingSimulation/OpenLB-1.5-0/OpenLB-1.5-0.sh b/ManufacturingSimulation/OpenLB-1.5-0/OpenLB-1.5-0.sh index fa74e87c7315a5f4fc76038d99142ba1616d3347..2380e2ed2b007877caa3155dbd337e2cb76131ca 100644 --- a/ManufacturingSimulation/OpenLB-1.5-0/OpenLB-1.5-0.sh +++ b/ManufacturingSimulation/OpenLB-1.5-0/OpenLB-1.5-0.sh @@ -26,16 +26,15 @@ tar -xvf $buildpath/olb-1.5r0.tgz -C $buildpath && rm -rf $buildpath/olb-1.5r0.t cd $buildpath/olb-1.5r0 sed -i "s/-march=native//g" config.mk -sed -i "s/g++/clang++/g" config.mk -sed -i "s/:= gcc/:= clang/g" config.mk +sed -i "s/g++/mpic++/g" config.mk +sed -i "s/:= gcc/:= mpicc/g" config.mk cd $buildpath/olb-1.5r0/src/utilities sed -i "s/for_each_n/for_each/g" benchmarkUtil.h -export CC=clang -export CXX=clang++ -export FC=flang +export CC=mpicc +export CXX=mpic++ cd $buildpath/olb-1.5r0 diff --git a/ManufacturingSimulation/OpenLB-1.5-0/build.sh b/ManufacturingSimulation/OpenLB-1.5-0/build.sh index 5fa09140765be4cbc6470ac123c5138726520b0b..389abbf2c8f0b0f08aad2ba7201d5dcd6b71043f 100644 --- a/ManufacturingSimulation/OpenLB-1.5-0/build.sh +++ b/ManufacturingSimulation/OpenLB-1.5-0/build.sh @@ -27,6 +27,10 @@ bash $dep_dir/bisheng-compiler-2.1.0.sh $buildpath $installpath module use $installpath/bisheng-compiler-2.1.0 module load $installpath/bisheng-compiler-2.1.0/bisheng_modulefiles +bash $dep_dir/hmpi-1.1.1.sh $buildpath $installpath +module use $installpath/hmpi-1.1.1 +module load $installpath/hmpi-1.1.1/hmpi_modulefiles + bash OpenLB-1.5-0.sh $buildpath $installpath diff --git a/ManufacturingSimulation/OpenLB-1.5-0/dependency/hmpi-1.1.1.sh b/ManufacturingSimulation/OpenLB-1.5-0/dependency/hmpi-1.1.1.sh new file mode 100644 index 0000000000000000000000000000000000000000..667f3deff14f91e46a38f9ac7c51f75c8900da08 --- /dev/null +++ b/ManufacturingSimulation/OpenLB-1.5-0/dependency/hmpi-1.1.1.sh @@ -0,0 +1,72 @@ +#!/bin/bash + +if [[ $# -ne 2 ]]; then + echo "The format is as follows:" + echo "bash hmpi-1.1.1.sh buildpath installpath" + echo ":param buildpath: 应用构建绝对路径" + echo ":param installpath: 应用安装绝对路径" + exit 1 +fi + +[[ ! "$1" =~ ^/.* || ! -d "$1" || "$1" = "/" ]] && echo "请输入正确的构建路径" && exit 1 +[[ ! "$2" =~ ^/.* || ! -d "$2" || "$2" = "/" ]] && echo "请输入正确的安装路径" && exit 1 + +buildpath=$1 +installpath=$2 +[[ "$buildpath" =~ .*/$ ]] && buildpath=${buildpath%/*} +[[ "$installpath" =~ .*/$ ]] && installpath=${installpath%/*} +[[ "$buildpath" == "$installpath" ]] && echo "构建路径与安装路径需为不同路径" && exit 1 +set -e +yum install -y wget tar perl-Data-Dumper autoconf automake libtool numactl binutils systemd-devel valgrind flex environment-modules gcc-c++ git + +download_pkg() +{ + wget -t 0 -c -P $buildpath $1 + tar xf $buildpath/v1.1.1-huawei.tar.gz -C $buildpath + rm -rf $buildpath/v1.1.1-huawei.tar.gz +} + +download_pkg https://github.com/kunpengcompute/hmpi/archive/refs/tags/v1.1.1-huawei.tar.gz +download_pkg https://github.com/kunpengcompute/hucx/archive/refs/tags/v1.1.1-huawei.tar.gz +download_pkg https://github.com/kunpengcompute/xucg/archive/refs/tags/v1.1.1-huawei.tar.gz +cp -r $buildpath/xucg-1.1.1-huawei/* $buildpath/hucx-1.1.1-huawei/src/ucg/ +cd $buildpath/hucx-1.1.1-huawei +git init && ./autogen.sh +./contrib/configure-opt --prefix=$installpath/hmpi-1.1.1/hucx-1.1.1-huawei --disable-numa CC=clang CXX=clang++ FC=flang +for file in `find . -name Makefile`;do sed -i "s/-Werror//g" $file;done +for file in `find . -name Makefile`;do sed -i "s/-implicit-function-declaration//g" $file;done +make -j$(nproc) +make -j$(nproc) install +export PATH=$installpath/hmpi-1.1.1/hucx-1.1.1-huawei/bin:$PATH +export LD_LIBRARY_PATH=$installpath/hmpi-1.1.1/hucx-1.1.1-huawei/lib:$LD_LIBRARY_PATH +export INCLUDE=$installpath/hmpi-1.1.1/hucx-1.1.1-huawei/include:$INCLUDE +cd $buildpath/hmpi-1.1.1-huawei +./autogen.pl CC=clang CXX=clang++ FC=flang +./configure --prefix=$installpath/hmpi-1.1.1/hmpi-1.1.1-huawei --with-platform=contrib/platform/mellanox/optimized --enable-mpil-compatibility \ + --with-ucx=$installpath/hmpi-1.1.1/hucx-1.1.1-huawei CC=clang CXX=clang++ FC=flang +make -j$(nproc) +make -j$(nproc) install +cat>"$installpath/hmpi-1.1.1/hmpi_modulefiles"<