100 lines
2.9 KiB
RPMSpec
100 lines
2.9 KiB
RPMSpec
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
|