From 8f775852a78038c25f87f0766ae6e6f859036944 Mon Sep 17 00:00:00 2001 From: Andrea Bocci Date: Wed, 20 Apr 2022 15:46:20 +0200 Subject: [PATCH 1/2] Add xpmem library from the master branch as of 2022.03.08 / 61c39ef Add the xpmem library from the HEAD of the master branch as of 2022.03.08, corresponding to the commit 61c39efdea943ac863037d7e35b236145904e64d. Based on xpmem v2.6.3 with updates for Linux kernel up to 5.17. --- scram-tools.file/tools/xpmem/xpmem.xml | 8 ++++++ xpmem.spec | 35 ++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 scram-tools.file/tools/xpmem/xpmem.xml create mode 100644 xpmem.spec diff --git a/scram-tools.file/tools/xpmem/xpmem.xml b/scram-tools.file/tools/xpmem/xpmem.xml new file mode 100644 index 00000000000..6fcba6b18e1 --- /dev/null +++ b/scram-tools.file/tools/xpmem/xpmem.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/xpmem.spec b/xpmem.spec new file mode 100644 index 00000000000..9fe50408319 --- /dev/null +++ b/xpmem.spec @@ -0,0 +1,35 @@ +### RPM external xpmem v2.6.3-20220308 +%define commit 61c39efdea943ac863037d7e35b236145904e64d + +BuildRequires: autotools +Source: https://github.com/hjelmn/%{n}/archive/%{commit}.tar.gz + +%prep +%setup -n %{n}-%{commit} + +./autogen.sh +./configure \ + --prefix=%{i} \ + --enable-shared \ + --disable-static \ + --disable-dependency-tracking \ + --disable-kernel-module \ + --with-pic \ + --with-gnu-ld + +%build +make %{makeprocesses} + +%install +make install + +# remove kernel module rules +rm -rf %{i}/etc + +# remove the libtool library files +rm -f %{i}/lib/lib*.la + +# remove pkg-config to avoid rpm-generated dependency on /usr/bin/pkg-config +rm -rf %{i}/lib/pkgconfig + +%post From 431af70f3f2c916a9bbf21ce43ea32ab9d870d2e Mon Sep 17 00:00:00 2001 From: Andrea Bocci Date: Wed, 20 Apr 2022 15:56:29 +0200 Subject: [PATCH 2/2] Update UCX to version 1.12.1 Enable additional libraries in UCX: - enable the use of xpmem for intra-node communication; - enable the use of ROCm for AMD gpus (only for x86_64); - remove the ROCm GDR module, which is not compatible with GDRCopy v2.x. Update UCX to version 1.12.1: - change the default for UCX_MEM_CUDA_HOOK_MODE from "reloc" to "bistro"; - various bug fixes for CUDA and ROCm; - see https://github.com/openucx/ucx/releases/tag/v1.12.1 for the full change log. --- ucx.spec | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/ucx.spec b/ucx.spec index c1288f8fc4a..678bc9ee263 100644 --- a/ucx.spec +++ b/ucx.spec @@ -1,19 +1,26 @@ -### RPM external ucx 1.12.0 -Source: https://github.com/openucx/%{n}/releases/download/v%{realversion}/%{n}-%{realversion}.tar.gz +### RPM external ucx 1.12.1 +Source: https://github.com/openucx/%{n}/archive/refs/tags/v%{realversion}.tar.gz BuildRequires: autotools +Requires: cuda gdrcopy Requires: numactl -Requires: gdrcopy cuda Requires: rdma-core +%ifarch x86_64 +Requires: rocm +%endif +Requires: xpmem AutoReq: no -# external libraries are needed for additional protocols: -# --with-rocm: AMD ROCm platform for accelerated compute -# --with-cm: Userspace InfiniBand Communication Managment library: deprecated and removed from RDMA core v17 on December 2017 -# --with-knem: KNEM High-Performance Intra-Node MPI Communication -# etc. %prep %setup -q -n %{n}-%{realversion} +# remove the ROCm GDR module, because it is not compatible with GDRCopy v2.x +sed -e'/SUBDIRS/s/ *\//' -i src/uct/rocm/Makefile.am +sed -e'/src\/uct\/rocm\/gdr\/configure\.m4/d' -i src/uct/rocm/configure.m4 +rm -rf src/uct/rocm/gdr + +# regenerate the configure files and Makefiles +./autogen.sh + ./configure \ --prefix=%i \ --disable-dependency-tracking \ @@ -32,9 +39,14 @@ AutoReq: no --with-avx \ --with-sse41 \ --with-sse42 \ + --without-go \ --without-java \ --with-cuda=$CUDA_ROOT \ +%ifarch x86_64 + --with-rocm=$ROCM_ROOT \ +%else --without-rocm \ +%endif --with-gdrcopy=$GDRCOPY_ROOT \ --with-verbs=$RDMA_CORE_ROOT \ --with-rc \ @@ -43,10 +55,10 @@ AutoReq: no --with-mlx5-dv \ --with-ib-hw-tm \ --with-dm \ - --without-cm \ --with-rdmacm=$RDMA_CORE_ROOT \ --without-knem \ - --with-xpmem \ + --with-xpmem=$XPMEM_ROOT \ + --without-ugni \ CFLAGS="-Wno-error=array-bounds" \ CPPFLAGS="-I$NUMACTL_ROOT/include" \ LDFLAGS="-L$NUMACTL_ROOT/lib"