From c61a13d4fad84948cfe7fd22f8965c864dc61aad Mon Sep 17 00:00:00 2001 From: wanghanwen <1564586847@qq.com> Date: Mon, 19 Feb 2024 19:05:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BC=96=E8=AF=91=E5=99=A8?= =?UTF-8?q?=E3=80=81mpi=E7=9A=84modulefile=E7=94=9F=E6=88=90=E9=80=BB?= =?UTF-8?q?=E8=BE=91;=E6=96=B0=E5=A2=9E=E6=96=B0=E7=89=88=E6=AF=95?= =?UTF-8?q?=E6=98=87=E7=BC=96=E8=AF=91=E5=99=A8=E3=80=81HMPI=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package/bisheng/3.1.0/install.sh | 4 +++ package/bisheng/3.2.0/install.sh | 4 +++ package/hmpi/1.3.0/install.sh | 6 ++--- package/hmpi/1.3.1/install.sh | 44 +++++++++++++++++++++++++++++++ package/hmpi/2.3.0/install.sh | 44 +++++++++++++++++++++++++++++++ package/libtirpc/1.3.3/install.sh | 12 +++++++++ src/installService.py | 8 ++++++ 7 files changed, 119 insertions(+), 3 deletions(-) create mode 100644 package/bisheng/3.1.0/install.sh create mode 100644 package/bisheng/3.2.0/install.sh create mode 100644 package/hmpi/1.3.1/install.sh create mode 100644 package/hmpi/2.3.0/install.sh create mode 100644 package/libtirpc/1.3.3/install.sh diff --git a/package/bisheng/3.1.0/install.sh b/package/bisheng/3.1.0/install.sh new file mode 100644 index 0000000..714dcaa --- /dev/null +++ b/package/bisheng/3.1.0/install.sh @@ -0,0 +1,4 @@ +#!/bin/bash +set -e +export bisheng_ver='BiShengCompiler-3.1.0' +../meta.sh $1 diff --git a/package/bisheng/3.2.0/install.sh b/package/bisheng/3.2.0/install.sh new file mode 100644 index 0000000..2286cb5 --- /dev/null +++ b/package/bisheng/3.2.0/install.sh @@ -0,0 +1,4 @@ +#!/bin/bash +set -e +export bisheng_ver='BiShengCompiler-3.2.0' +../meta.sh $1 diff --git a/package/hmpi/1.3.0/install.sh b/package/hmpi/1.3.0/install.sh index 8fef3cf..095f2d0 100755 --- a/package/hmpi/1.3.0/install.sh +++ b/package/hmpi/1.3.0/install.sh @@ -11,7 +11,7 @@ rm ucx-1.10.1 -rf tar xf ${JARVIS_DOWNLOAD}/hucx-1.3.0-huawei.tar.gz cd ucx-1.10.1 ./autogen.sh -./contrib/configure-opt --prefix=$1/hucx --disable-numa --enable-mt CC=clang CXX=clang++ FC=flang CFLAGS="-Wno-unused-but-set-variable -Wno-error=int-conversion" CXXFLAGS="-Wno-unused-but-set-variable -Wno-error=int-conversion" +./contrib/configure-opt --prefix=$1/hucx --disable-numa --enable-mt CFLAGS="-Wno-unused-but-set-variable -Wno-error=int-conversion" CXXFLAGS="-Wno-unused-but-set-variable -Wno-error=int-conversion" make -j make -j install cd - @@ -25,7 +25,7 @@ rm xucg-v1.3.0-huawei/ -rf tar xf ${JARVIS_DOWNLOAD}/xucg-1.3.0-huawei.tar.gz cd xucg-v1.3.0-huawei/ mkdir build && cd build -cmake .. -DCMAKE_INSTALL_PREFIX=$1/xucg -DCMAKE_BUILD_TYPE=Release -DUCG_BUILD_WITH_UCX=$1/hucx -DUCG_ENABLE_MT=ON -DUCG_BUILD_TESTS=OFF -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_Fortran_COMPILER=flang +cmake .. -DCMAKE_INSTALL_PREFIX=$1/xucg -DCMAKE_BUILD_TYPE=Release -DUCG_BUILD_WITH_UCX=$1/hucx -DUCG_ENABLE_MT=ON -DUCG_BUILD_TESTS=OFF -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_Fortran_COMPILER=$FC make -j make -j install cd - @@ -37,7 +37,7 @@ rm hmpi-v1.3.0-huawei/ -rf tar xf ${JARVIS_DOWNLOAD}/hmpi-1.3.0-huawei.tar.gz cd hmpi-v1.3.0-huawei/ ./autogen.pl -./configure --prefix=$1 --with-platform=contrib/platform/mellanox/optimized --enable-mpi1-compatibility --with-ucx=$1/hucx --with-ucg=$1/xucg CC=clang CXX=clang++ FC=flang +./configure --prefix=$1 --with-platform=contrib/platform/mellanox/optimized --enable-mpi1-compatibility --with-ucx=$1/hucx --with-ucg=$1/xucg make -j make -j install cd - diff --git a/package/hmpi/1.3.1/install.sh b/package/hmpi/1.3.1/install.sh new file mode 100644 index 0000000..e0e4f47 --- /dev/null +++ b/package/hmpi/1.3.1/install.sh @@ -0,0 +1,44 @@ +#!/bin/bash +set -x +set -e +hmpi_version='1.3.1' +. ${DOWNLOAD_TOOL} -u https://gitee.com/kunpengcompute/hucx/repository/archive/v1.3.1.spc001-huawei.tar.gz -f hucx-${hmpi_version}-huawei.tar.gz +. ${DOWNLOAD_TOOL} -u https://gitee.com/kunpengcompute/xucg/repository/archive/v1.3.1-huawei.tar.gz -f xucg-${hmpi_version}-huawei.tar.gz +. ${DOWNLOAD_TOOL} -u https://gitee.com/kunpengcompute/hmpi/repository/archive/v1.3.1.spc001-huawei.tar.gz -f hmpi-${hmpi_version}-huawei.tar.gz +cd ${JARVIS_TMP} +. $CHECK_ROOT && yum install -y perl-Data-Dumper autoconf automake libtool binutils flex +rm hucx-v${hmpi_version}.spc001-huawei -rf +tar xf ${JARVIS_DOWNLOAD}/hucx-${hmpi_version}-huawei.tar.gz +cd hucx-v${hmpi_version}.spc001-huawei +./autogen.sh +./contrib/configure-opt --prefix=$1/hucx --disable-numa --enable-mt CFLAGS="-Wno-unused-but-set-variable -Wno-error=int-conversion" CXXFLAGS="-Wno-unused-but-set-variable -Wno-error=int-conversion" +make -j +make -j install +cd - +export LD_LIBRARY_PATH=$1/hucx/lib:$LD_LIBRARY_PATH +export C_INCLUDE_PATH=$1/hucx/include:$C_INCLUDE_PATH +export CPLUS_INCLUDE_PATH=$1/hucx/include:$CPLUS_INCLUDE_PATH + +export CFLAGS="-Wno-unused-but-set-variable -Wno-error=int-conversion" CXXFLAGS="-Wno-unused-but-set-variable -Wno-error=int-conversion" FFLAGS="-Wno-error=int-conversion" + +rm xucg-v${hmpi_version}-huawei/ -rf +tar xf ${JARVIS_DOWNLOAD}/xucg-${hmpi_version}-huawei.tar.gz +cd xucg-v${hmpi_version}-huawei/ +mkdir build && cd build +cmake .. -DCMAKE_INSTALL_PREFIX=$1/xucg -DCMAKE_BUILD_TYPE=Release -DUCG_BUILD_WITH_UCX=$1/hucx -DUCG_ENABLE_MT=ON -DUCG_BUILD_TESTS=OFF -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_Fortran_COMPILER=$FC +make -j +make -j install +cd - +export LD_LIBRARY_PATH=$1/xucg/lib:$LD_LIBRARY_PATH +export C_INCLUDE_PATH=$1/xucg/include:$C_INCLUDE_PATH +export CPLUS_INCLUDE_PATH=$1/xucg/include:$CPLUS_INCLUDE_PATH + +rm hmpi-v${hmpi_version}.spc001-huawei/ -rf +tar xf ${JARVIS_DOWNLOAD}/hmpi-${hmpi_version}-huawei.tar.gz +cd hmpi-v${hmpi_version}.spc001-huawei/ +./autogen.pl +./configure --prefix=$1 --with-platform=contrib/platform/mellanox/optimized --enable-mpi1-compatibility --with-ucx=$1/hucx --with-ucg=$1/xucg +make -j +make -j install +cd - + diff --git a/package/hmpi/2.3.0/install.sh b/package/hmpi/2.3.0/install.sh new file mode 100644 index 0000000..4772140 --- /dev/null +++ b/package/hmpi/2.3.0/install.sh @@ -0,0 +1,44 @@ +#!/bin/bash +set -x +set -e +hmpi_version='2.3.0' +. ${DOWNLOAD_TOOL} -u https://gitee.com/kunpengcompute/hucx/repository/archive/v2.3.0-huawei.tar.gz -f hucx-${hmpi_version}-huawei.tar.gz +. ${DOWNLOAD_TOOL} -u https://gitee.com/kunpengcompute/xucg/repository/archive/v2.3.0-huawei.tar.gz -f xucg-${hmpi_version}-huawei.tar.gz +. ${DOWNLOAD_TOOL} -u https://gitee.com/kunpengcompute/hmpi/repository/archive/v2.3.0-huawei.tar.gz -f hmpi-${hmpi_version}-huawei.tar.gz +cd ${JARVIS_TMP} +. $CHECK_ROOT && yum install -y perl-Data-Dumper autoconf automake libtool binutils flex +rm hucx-v${hmpi_version}-huawei -rf +tar xf ${JARVIS_DOWNLOAD}/hucx-${hmpi_version}-huawei.tar.gz +cd hucx-v${hmpi_version}-huawei +./autogen.sh +./contrib/configure-opt --prefix=$1/hucx --disable-numa --enable-mt CFLAGS="-Wno-unused-but-set-variable -Wno-error=int-conversion" CXXFLAGS="-Wno-unused-but-set-variable -Wno-error=int-conversion" +make -j +make -j install +cd - +export LD_LIBRARY_PATH=$1/hucx/lib:$LD_LIBRARY_PATH +export C_INCLUDE_PATH=$1/hucx/include:$C_INCLUDE_PATH +export CPLUS_INCLUDE_PATH=$1/hucx/include:$CPLUS_INCLUDE_PATH + +export CFLAGS="-Wno-unused-but-set-variable -Wno-error=int-conversion" CXXFLAGS="-Wno-unused-but-set-variable -Wno-error=int-conversion" FFLAGS="-Wno-error=int-conversion" + +rm xucg-v${hmpi_version}-huawei/ -rf +tar xf ${JARVIS_DOWNLOAD}/xucg-${hmpi_version}-huawei.tar.gz +cd xucg-v${hmpi_version}-huawei/ +mkdir build && cd build +cmake .. -DCMAKE_INSTALL_PREFIX=$1/xucg -DCMAKE_BUILD_TYPE=Release -DUCG_BUILD_WITH_UCX=$1/hucx -DUCG_ENABLE_MT=ON -DUCG_BUILD_TESTS=OFF -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_Fortran_COMPILER=$FC +make -j +make -j install +cd - +export LD_LIBRARY_PATH=$1/xucg/lib:$LD_LIBRARY_PATH +export C_INCLUDE_PATH=$1/xucg/include:$C_INCLUDE_PATH +export CPLUS_INCLUDE_PATH=$1/xucg/include:$CPLUS_INCLUDE_PATH + +rm hmpi-v${hmpi_version}-huawei/ -rf +tar xf ${JARVIS_DOWNLOAD}/hmpi-${hmpi_version}-huawei.tar.gz +cd hmpi-v${hmpi_version}-huawei/ +./autogen.pl +./configure --prefix=$1 --with-platform=contrib/platform/mellanox/optimized --enable-mpi1-compatibility --with-ucx=$1/hucx --with-ucg=$1/xucg +make -j +make -j install +cd - + diff --git a/package/libtirpc/1.3.3/install.sh b/package/libtirpc/1.3.3/install.sh new file mode 100644 index 0000000..ac64dba --- /dev/null +++ b/package/libtirpc/1.3.3/install.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -x +set -e +. ${DOWNLOAD_TOOL} -u https://sourceforge.net/projects/libtirpc/files/libtirpc/1.3.3/libtirpc-1.3.3.tar.bz2 +cd ${JARVIS_TMP} +rm -rf libtirpc-1.3.3 +tar -xvf ${JARVIS_DOWNLOAD}/libtirpc-1.3.3.tar.bz2 +cd libtirpc-1.3.3 +./configure --prefix=$1 +make -j +make install + diff --git a/src/installService.py b/src/installService.py index 0c9d890..571d5ab 100644 --- a/src/installService.py +++ b/src/installService.py @@ -296,6 +296,7 @@ class InstallService: bins_dir = [] libs_dir = [] incs_dir = [] + compiler_values = '' bins_str = '' libs_str = '' incs_str = '' @@ -317,6 +318,12 @@ class InstallService: libs_str = "prepend-path LD_LIBRARY_PATH "+':'.join(libs_dir) if len(incs_dir) >= 1: incs_str = "prepend-path INCLUDE " + ':'.join(incs_dir) + if "bisheng" in sname: + compiler_values = "setenv CC clang \nsetenv CXX clang++ \nsetenv FC flang \nsetenv F77 flang \nsetenv F90 flang " + elif "gcc" in sname: + compiler_values = "setenv CC gcc \nsetenv CXX g++ \nsetenv FC gfortran \nsetenv F77 gfortran \nsetenv F90 gfortran " + elif "hmpi" in sname or "openmpi" in sname: + compiler_values = "setenv CC mpicc \nsetenv CXX mpicxx \nsetenv FC mpifort \nsetenv F77 mpifort \nsetenv F90 mpifort " if self.is_mpi_software(sname): opal_prefix = f"setenv OPAL_PREFIX {install_path}" module_file_content = f'''#%Module1.0##################################################################### @@ -324,6 +331,7 @@ set prefix {install_path} set version {sversion} setenv {sname.upper().replace('-','_')}_PATH {install_path} +{compiler_values} {opal_prefix} {bins_str} {libs_str} -- Gitee