diff --git a/Hmpi_modulefiles b/Hmpi_modulefiles new file mode 100644 index 0000000..7d286f6 --- /dev/null +++ b/Hmpi_modulefiles @@ -0,0 +1,7 @@ +#%Module1.0 +# HMPI module for use with 'environment-modules' package: +conflict mpi +prepend-path OPAL_PREFIX /usr/share/hmpi/ +prepend-path PATH /usr/share/hmpi/bin:/usr/share/hucx/bin +prepend-path LD_LIBRARY_PATH /usr/share/hmpi/lib:/usr/share/hucx/lib +prepend-path INCLUDE /usr/share/hmpi/include:/usr/share/hucx/include diff --git a/hmpi-1.1.1-huawei.tar.gz b/hmpi-1.1.1-huawei.tar.gz new file mode 100644 index 0000000..bb6b6fd Binary files /dev/null and b/hmpi-1.1.1-huawei.tar.gz differ diff --git a/hmpi.spec b/hmpi.spec new file mode 100644 index 0000000..a6b1762 --- /dev/null +++ b/hmpi.spec @@ -0,0 +1,99 @@ +Name: hyper-mpi +Version: 1.1.1 +Release: 1%{?dist} +Summary: Hyper MPI and HUCX software package +License: BSD-3-Clause +URL: https://github.com/kunpengcompute/hmpi +Source0: hmpi-1.1.1-huawei.tar.gz +Source1: hucx-1.1.1-huawei.tar.gz +Source2: xucg-1.1.1-huawei.tar.gz +Source10: Hmpi_modulefiles +BuildRequires: make, gcc, clang, perl-Data-Dumper, autoconf, automake, libtool, numactl, numactl-devel, binutils, systemd-devel, valgrind, flex +Requires: environment-modules + +# Disable debug package +%global debug_package %{nil} + +%description +Hyper MPI is a high-performance MPI implementation that relies on HUCX for communication. + +%prep +%setup -q -n hmpi-1.1.1-huawei + +%global hucx_dir %{_builddir}/hucx-1.1.1-huawei +%global xucg_dir %{_builddir}/xucg-1.1.1-huawei + +pushd %{_builddir} +%{__tar} -xzf %{_sourcedir}/hucx-1.1.1-huawei.tar.gz +%{__tar} -xzf %{_sourcedir}/xucg-1.1.1-huawei.tar.gz +popd + +mkdir -p %{hucx_dir}/src/ucg + +cp -r %{xucg_dir}/* %{hucx_dir}/src/ucg +if [ $? -ne 0 ]; then + echo "Error copying files from xUCG to HUCX." + exit 1 +fi + +%build +cd %{_builddir}/hucx-1.1.1-huawei +./autogen.sh +./contrib/configure-opt --prefix=%{_builddir}/hucx-install%{_prefix}/share/hucx +make %{?_smp_mflags} + +make install + +export HUCX_PATH=%{_builddir}/hucx-install%{_prefix}/share/hucx +export LD_LIBRARY_PATH=$HUCX_PATH/lib:$LD_LIBRARY_PATH +export PKG_CONFIG_PATH=$HUCX_PATH/lib/pkgconfig:$PKG_CONFIG_PATH + + +cd %{_builddir}/hmpi-1.1.1-huawei +./autogen.pl +./configure --prefix=%{_prefix}/share/hmpi --with-platform=contrib/platform/mellanox/optimized --enable-mpi1-compatibility --with-ucx=$HUCX_PATH +make %{?_smp_mflags} + +rm -rf %{_builddir}/hucx-1.1.1-huawei +%{__tar} -xzf %{_sourcedir}/hucx-1.1.1-huawei.tar.gz -C %{_builddir} +mkdir -p %{hucx_dir}/src/ucg +cp -r %{xucg_dir}/* %{hucx_dir}/src/ucg + +cd %{_builddir}/hucx-1.1.1-huawei +./autogen.sh +./contrib/configure-opt --prefix=%{_prefix}/share/hucx +make %{?_smp_mflags} + +%install +cd %{_builddir}/hucx-1.1.1-huawei +make install DESTDIR=%{buildroot} + +cd %{_builddir}/hmpi-1.1.1-huawei +make install DESTDIR=%{buildroot} + +mkdir -p %{buildroot}/usr/share/Modules/modulefiles +install -m 644 %{SOURCE10} %{buildroot}/usr/share/Modules/modulefiles + +# Stop check-rpaths from complaining about standard runpaths. +export QA_RPATHS=0x0003 + +%files +%{_prefix}/share/hucx +%{_prefix}/share/hmpi +%{_prefix}/share/Modules/modulefiles + +%post +module use %{_prefix}/share/Modules/modulefiles +module load %{_prefix}/share/Modules/modulefiles/Hmpi_modulefiles + +if ! grep -q 'module use /usr/share/Modules/modulefiles' $HOME/.bashrc; then + echo 'module use /usr/share/Modules/modulefiles' >> $HOME/.bashrc +fi + +if ! grep -q 'module load /usr/share/Modules/modulefiles/Hmpi_modulefiles' $HOME/.bashrc; then + echo 'module load /usr/share/Modules/modulefiles/Hmpi_modulefiles' >> $HOME/.bashrc +fi + +%changelog +* Thu Jun 20 2024 liping <1477412247@qq.com> - 1.1.1-1 +- First build of Hyper MPI diff --git a/hmpi.yaml b/hmpi.yaml new file mode 100644 index 0000000..ee30f04 --- /dev/null +++ b/hmpi.yaml @@ -0,0 +1,5 @@ +version_control: github +src_repo: +tag_prefix: +separator: +url: https://github.com/kunpengcompute/hmpi diff --git a/hucx-1.1.1-huawei.tar.gz b/hucx-1.1.1-huawei.tar.gz new file mode 100644 index 0000000..5e4adf5 Binary files /dev/null and b/hucx-1.1.1-huawei.tar.gz differ diff --git a/xucg-1.1.1-huawei.tar.gz b/xucg-1.1.1-huawei.tar.gz new file mode 100644 index 0000000..215ffe4 Binary files /dev/null and b/xucg-1.1.1-huawei.tar.gz differ