Skip to content

Commit a0fdd2a

Browse files
authored
Merge pull request #9818 from fwyzard/IB/CMSSW_15_1_X/master_openmpi_updates
Update RDMA Core, OFI, UCX, and Open MPI
2 parents 06abaf9 + 95dd427 commit a0fdd2a

File tree

9 files changed

+183
-56
lines changed

9 files changed

+183
-56
lines changed

cmssw-tools.spec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ Requires: numactl
7878
Requires: hwloc
7979
Requires: rdma-core
8080
Requires: ucx
81+
Requires: libfabric
8182
Requires: openmpi
8283
Requires: sigcpp
8384
Requires: sqlite

libfabric.spec

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
### RPM external libfabric 2.1.0
2+
Source: https://github.com/ofiwg/%{n}/releases/download/v%{realversion}/%{n}-%{realversion}.tar.bz2
3+
%{!?without_cuda:Requires: cuda gdrcopy}
4+
%{!?without_rocm:Requires: rocm}
5+
Requires: curl
6+
Requires: numactl
7+
Requires: rdma-core
8+
Requires: xpmem
9+
10+
%prep
11+
%setup -q -n %{n}-%{realversion}
12+
13+
# regenerate the configure files and Makefiles
14+
./autogen.sh
15+
16+
./configure \
17+
--prefix=%i \
18+
--disable-dependency-tracking \
19+
--disable-debug \
20+
--disable-profile \
21+
--disable-asan \
22+
--disable-lsan \
23+
--disable-tsan \
24+
--disable-ubsan \
25+
--enable-shared \
26+
--disable-static \
27+
--enable-shm \
28+
--enable-sm2 \
29+
--enable-xpmem=$XPMEM_ROOT \
30+
--disable-sockets \
31+
--enable-tcp \
32+
--enable-udp \
33+
--enable-verbs=$RDMA_CORE_ROOT \
34+
--disable-opx \
35+
--disable-psm2 \
36+
--disable-psm3 \
37+
--disable-usnic \
38+
--disable-efa \
39+
--disable-cxi \
40+
--disable-mrail \
41+
--disable-lpp \
42+
--disable-ucx \
43+
--enable-rxm \
44+
--enable-lnx \
45+
%if 0%{!?without_cuda:1}
46+
--enable-cuda-dlopen \
47+
--enable-gdrcopy-dlopen \
48+
--with-cuda=$CUDA_ROOT \
49+
--with-gdrcopy=$GDRCOPY_ROOT \
50+
%else
51+
--disable-cuda-dlopen \
52+
--disable-gdrcopy-dlopen \
53+
--without-cuda \
54+
--without-gdrcopy \
55+
%endif
56+
%if 0%{!?without_rocm:1}
57+
--enable-rocr-dlopen \
58+
--with-rocr=$ROCM_ROOT \
59+
%else
60+
--disable-rocr-dlopen \
61+
--without-rocr \
62+
%endif
63+
--disable-ze-dlopen \
64+
--without-ze \
65+
--with-pic \
66+
--with-dlopen \
67+
--with-gnu-ld \
68+
--with-curl=DIR \
69+
--with-numa=$NUMACTL_ROOT
70+
71+
# CFLAGS="-Wno-error=array-bounds"
72+
73+
%build
74+
make %{makeprocesses}
75+
76+
%install
77+
make install
78+
79+
%post

openmpi.spec

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
### RPM external openmpi 4.1.6
1+
### RPM external openmpi 4.1.x-20250505
22
## INITENV SET OPAL_PREFIX %{i}
3-
Source: https://download.open-mpi.org/release/open-mpi/v4.1/%{n}-%{realversion}.tar.bz2
4-
BuildRequires: autotools
3+
%define branch v4.1.x
4+
%define tag e6d2cb856f3fc649aa01bd5b688a003b3b33db7d
5+
Source: git+https://github.com/open-mpi/ompi.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz
6+
BuildRequires: autotools flex
57
%{!?without_cuda:Requires: cuda}
8+
Requires: libfabric
69
Requires: hwloc
710
Requires: rdma-core
811
Requires: xpmem
912
Requires: ucx
1013
Requires: zlib
1114

1215
# external libraries are needed for additional protocols:
13-
# --with-ofi: Open Fabric Interface's libfabric
1416
# --with-mxm: Mellanox Messaging (depracated, use UCX instead)
1517
# --with-fca: Mellanox Fabric Collective Accelerator
1618
# --with-hcoll: Mellanox Hierarchical Collectives
@@ -20,6 +22,8 @@ Requires: zlib
2022
%prep
2123
%setup -q -n %{n}-%{realversion}
2224

25+
AUTOMAKE_JOBS=%{compiling_processes} ./autogen.pl
26+
2327
./configure \
2428
--prefix=%i \
2529
--disable-dependency-tracking \
@@ -33,7 +37,7 @@ Requires: zlib
3337
--with-zlib=$ZLIB_ROOT \
3438
%{!?without_cuda:--with-cuda=$CUDA_ROOT} \
3539
--with-hwloc=$HWLOC_ROOT \
36-
--without-ofi \
40+
--with-ofi=$LIBFABRIC_ROOT \
3741
--without-portals4 \
3842
--without-psm \
3943
--without-psm2 \

rdma-core-VERBS_CONFIG_DIR.patch

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
diff --git a/libibverbs/dynamic_driver.c b/libibverbs/dynamic_driver.c
2+
index 7fa4233..c2ff2bb 100644
3+
--- a/libibverbs/dynamic_driver.c
4+
+++ b/libibverbs/dynamic_driver.c
5+
@@ -115,27 +115,33 @@ static void read_config_file(const char *path)
6+
7+
static void read_config(void)
8+
{
9+
+ char *verbs_config_dir;
10+
DIR *conf_dir;
11+
struct dirent *dent;
12+
char *path;
13+
14+
- conf_dir = opendir(IBV_CONFIG_DIR);
15+
+ verbs_config_dir = getenv("VERBS_CONFIG_DIR");
16+
+ if (!verbs_config_dir) {
17+
+ verbs_config_dir = IBV_CONFIG_DIR;
18+
+ }
19+
+
20+
+ conf_dir = opendir(verbs_config_dir);
21+
if (!conf_dir) {
22+
fprintf(stderr,
23+
PFX "Warning: couldn't open config directory '%s'.\n",
24+
- IBV_CONFIG_DIR);
25+
+ verbs_config_dir);
26+
return;
27+
}
28+
29+
while ((dent = readdir(conf_dir))) {
30+
struct stat buf;
31+
32+
- if (asprintf(&path, "%s/%s", IBV_CONFIG_DIR, dent->d_name) <
33+
+ if (asprintf(&path, "%s/%s", verbs_config_dir, dent->d_name) <
34+
0) {
35+
fprintf(stderr,
36+
PFX
37+
"Warning: couldn't read config file %s/%s.\n",
38+
- IBV_CONFIG_DIR, dent->d_name);
39+
+ verbs_config_dir, dent->d_name);
40+
goto out;
41+
}
42+

rdma-core.spec

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
### RPM external rdma-core 50.0
1+
### RPM external rdma-core 57.0
22
## INITENV +PATH LD_LIBRARY_PATH %{i}/lib64
33

44
Source: https://github.com/linux-rdma/%{n}/releases/download/v%{realversion}/rdma-core-%{realversion}.tar.gz
5+
Patch: rdma-core-VERBS_CONFIG_DIR
56
BuildRequires: cmake ninja
67

78
%prep
89
%setup -q -n %{n}-%{realversion}
10+
%patch -p1
911

1012
%build
1113
rm -rf build
@@ -33,10 +35,19 @@ ninja -v %{makeprocesses} install
3335
# remove pkg-config to avoid rpm-generated dependency on /usr/bin/pkg-config
3436
rm -rf %{i}/lib64/pkgconfig
3537

36-
# keep only the libraries and include files
37-
rm -rf %{i}/bin
38-
rm -rf %{i}/etc
38+
# keep only the user binaries, libibverbs configuration, libraries and include files
39+
rm -rf %{i}/etc/infiniband-diags
40+
rm -rf %{i}/etc/init.d
41+
rm -rf %{i}/etc/modprobe.d
42+
rm -rf %{i}/etc/rdma
3943
rm -rf %{i}/lib
4044
rm -rf %{i}/libexec
4145
rm -rf %{i}/sbin
42-
rm -rf %{i}/share
46+
rm -rf %{i}/share/perl5
47+
48+
# update the libibverbs plugins with the full path
49+
sed -e's#driver \(\w\+\)#driver %{i}/lib64/libibverbs/lib\1#' -i %{i}/etc/libibverbs.d/*
50+
51+
%post
52+
# relocate the libibverbs plugins path
53+
%{relocateConfig}etc/libibverbs.d/*

rocm.spec

Lines changed: 25 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -23,43 +23,33 @@
2323
%define rocprofiler_register_pkg rocprofiler-register-%{rocprofiler_register_tag}
2424

2525
Source0: https://%{repository}/%{repoversion}/main/amd-smi-lib-24.7.1.60302-66.el%{rhel}.%{_arch}.rpm
26-
Source1: https://%{repository}/%{repoversion}/main/amd-smi-lib-debuginfo-24.7.1.60302-66.el%{rhel}.%{_arch}.rpm
27-
Source2: https://%{repository}/%{repoversion}/main/comgr-2.8.0.60302-66.el%{rhel}.%{_arch}.rpm
28-
Source3: https://%{repository}/%{repoversion}/main/comgr-debuginfo-2.8.0.60302-66.el%{rhel}.%{_arch}.rpm
29-
Source4: https://%{repository}/%{repoversion}/main/hip-devel-6.3.42134.60302-66.el%{rhel}.%{_arch}.rpm
30-
Source5: https://%{repository}/%{repoversion}/main/hip-runtime-amd-6.3.42134.60302-66.el%{rhel}.%{_arch}.rpm
31-
Source6: https://%{repository}/%{repoversion}/main/hip-runtime-amd-debuginfo-6.3.42134.60302-66.el%{rhel}.%{_arch}.rpm
32-
Source7: https://%{repository}/%{repoversion}/main/hipcc-1.1.1.60302-66.el%{rhel}.%{_arch}.rpm
33-
Source8: https://%{repository}/%{repoversion}/main/hipcc-debuginfo-1.1.1.60302-66.el%{rhel}.%{_arch}.rpm
34-
Source9: https://%{repository}/%{repoversion}/main/hsa-rocr-1.14.0.60302-66.el%{rhel}.%{_arch}.rpm
35-
Source10: https://%{repository}/%{repoversion}/main/hsa-rocr-debuginfo-1.14.0.60302-66.el%{rhel}.%{_arch}.rpm
36-
Source11: https://%{repository}/%{repoversion}/main/openmp-extras-devel-18.63.0.60302-66.el%{rhel}.%{_arch}.rpm
37-
Source12: https://%{repository}/%{repoversion}/main/openmp-extras-runtime-18.63.0.60302-66.el%{rhel}.%{_arch}.rpm
38-
Source13: https://%{repository}/%{repoversion}/main/rocm-core-6.3.2.60302-66.el%{rhel}.%{_arch}.rpm
39-
Source14: https://%{repository}/%{repoversion}/main/rocm-dbgapi-0.77.0.60302-66.el%{rhel}.%{_arch}.rpm
40-
Source15: https://%{repository}/%{repoversion}/main/rocm-dbgapi-debuginfo-0.77.0.60302-66.el%{rhel}.%{_arch}.rpm
41-
Source16: https://%{repository}/%{repoversion}/main/rocm-device-libs-1.0.0.60302-66.el%{rhel}.%{_arch}.rpm
42-
Source17: https://%{repository}/%{repoversion}/main/rocm-llvm-18.0.0.25012.60302-66.el%{rhel}.%{_arch}.rpm
43-
Source18: https://%{repository}/%{repoversion}/main/rocm-smi-lib-7.4.0.60302-66.el%{rhel}.%{_arch}.rpm
44-
Source19: https://%{repository}/%{repoversion}/main/rocm-smi-lib-debuginfo-7.4.0.60302-66.el%{rhel}.%{_arch}.rpm
45-
Source20: https://%{repository}/%{repoversion}/main/rocminfo-1.0.0.60302-66.el%{rhel}.%{_arch}.rpm
46-
Source21: https://%{repository}/%{repoversion}/main/rocminfo-debuginfo-1.0.0.60302-66.el%{rhel}.%{_arch}.rpm
47-
Source22: https://%{repository}/%{repoversion}/main/rocprim-devel-3.3.0.60302-66.el%{rhel}.%{_arch}.rpm
48-
Source23: https://%{repository}/%{repoversion}/main/rocprofiler-2.0.60302.60302-66.el%{rhel}.%{_arch}.rpm
49-
Source24: https://%{repository}/%{repoversion}/main/rocprofiler-compute-3.0.0.60302-66.el%{rhel}.%{_arch}.rpm
50-
Source25: https://%{repository}/%{repoversion}/main/rocprofiler-debuginfo-2.0.60302.60302-66.el%{rhel}.%{_arch}.rpm
51-
Source26: https://%{repository}/%{repoversion}/main/rocprofiler-devel-2.0.60302.60302-66.el%{rhel}.%{_arch}.rpm
52-
Source27: https://%{repository}/%{repoversion}/main/rocprofiler-docs-2.0.60302.60302-66.el%{rhel}.%{_arch}.rpm
53-
Source28: https://%{repository}/%{repoversion}/main/rocprofiler-plugins-2.0.60302.60302-66.el%{rhel}.%{_arch}.rpm
54-
Source29: https://%{repository}/%{repoversion}/main/rocprofiler-plugins-debuginfo-2.0.60302.60302-66.el%{rhel}.%{_arch}.rpm
55-
Source30: https://%{repository}/%{repoversion}/main/rocprofiler-register-0.4.0.60302-66.el%{rhel}.%{_arch}.rpm
56-
Source31: https://%{repository}/%{repoversion}/main/rocprofiler-systems-0.1.1.60302-66.el%{rhel}.%{_arch}.rpm
57-
Source32: https://%{repository}/%{repoversion}/main/rocprofiler-systems-debuginfo-0.1.1.60302-66.el%{rhel}.%{_arch}.rpm
58-
Source33: https://%{repository}/%{repoversion}/main/rocthrust-devel-3.3.0.60302-66.el%{rhel}.%{_arch}.rpm
26+
Source1: https://%{repository}/%{repoversion}/main/comgr-2.8.0.60302-66.el%{rhel}.%{_arch}.rpm
27+
Source2: https://%{repository}/%{repoversion}/main/hip-devel-6.3.42134.60302-66.el%{rhel}.%{_arch}.rpm
28+
Source3: https://%{repository}/%{repoversion}/main/hip-runtime-amd-6.3.42134.60302-66.el%{rhel}.%{_arch}.rpm
29+
Source4: https://%{repository}/%{repoversion}/main/hipcc-1.1.1.60302-66.el%{rhel}.%{_arch}.rpm
30+
Source5: https://%{repository}/%{repoversion}/main/hsa-rocr-1.14.0.60302-66.el%{rhel}.%{_arch}.rpm
31+
Source6: https://%{repository}/%{repoversion}/main/hsa-rocr-devel-1.14.0.60302-66.el%{rhel}.%{_arch}.rpm
32+
Source7: https://%{repository}/%{repoversion}/main/openmp-extras-devel-18.63.0.60302-66.el%{rhel}.%{_arch}.rpm
33+
Source8: https://%{repository}/%{repoversion}/main/openmp-extras-runtime-18.63.0.60302-66.el%{rhel}.%{_arch}.rpm
34+
Source9: https://%{repository}/%{repoversion}/main/rocm-core-6.3.2.60302-66.el%{rhel}.%{_arch}.rpm
35+
Source10: https://%{repository}/%{repoversion}/main/rocm-dbgapi-0.77.0.60302-66.el%{rhel}.%{_arch}.rpm
36+
Source11: https://%{repository}/%{repoversion}/main/rocm-device-libs-1.0.0.60302-66.el%{rhel}.%{_arch}.rpm
37+
Source12: https://%{repository}/%{repoversion}/main/rocm-llvm-18.0.0.25012.60302-66.el%{rhel}.%{_arch}.rpm
38+
Source13: https://%{repository}/%{repoversion}/main/rocm-smi-lib-7.4.0.60302-66.el%{rhel}.%{_arch}.rpm
39+
Source14: https://%{repository}/%{repoversion}/main/rocminfo-1.0.0.60302-66.el%{rhel}.%{_arch}.rpm
40+
Source15: https://%{repository}/%{repoversion}/main/rocprim-devel-3.3.0.60302-66.el%{rhel}.%{_arch}.rpm
41+
Source16: https://%{repository}/%{repoversion}/main/rocprofiler-2.0.60302.60302-66.el%{rhel}.%{_arch}.rpm
42+
Source17: https://%{repository}/%{repoversion}/main/rocprofiler-compute-3.0.0.60302-66.el%{rhel}.%{_arch}.rpm
43+
Source18: https://%{repository}/%{repoversion}/main/rocprofiler-devel-2.0.60302.60302-66.el%{rhel}.%{_arch}.rpm
44+
Source19: https://%{repository}/%{repoversion}/main/rocprofiler-docs-2.0.60302.60302-66.el%{rhel}.%{_arch}.rpm
45+
Source20: https://%{repository}/%{repoversion}/main/rocprofiler-plugins-2.0.60302.60302-66.el%{rhel}.%{_arch}.rpm
46+
Source21: https://%{repository}/%{repoversion}/main/rocprofiler-register-0.4.0.60302-66.el%{rhel}.%{_arch}.rpm
47+
Source22: https://%{repository}/%{repoversion}/main/rocprofiler-systems-0.1.1.60302-66.el%{rhel}.%{_arch}.rpm
48+
Source23: https://%{repository}/%{repoversion}/main/rocthrust-devel-3.3.0.60302-66.el%{rhel}.%{_arch}.rpm
5949

6050

6151
# sources for rocprofiler-register
62-
Source34: git+https://github.com/ROCm/rocprofiler-register.git?obj=%{rocprofiler_register_branch}/%{rocprofiler_register_tag}&export=%{rocprofiler_register_pkg}&submodules=1&output=/%{rocprofiler_register_pkg}.tgz
52+
Source24: git+https://github.com/ROCm/rocprofiler-register.git?obj=%{rocprofiler_register_branch}/%{rocprofiler_register_tag}&export=%{rocprofiler_register_pkg}&submodules=1&output=/%{rocprofiler_register_pkg}.tgz
6353

6454
BuildRequires: gmake cmake
6555
Requires: numactl zstd fmt
@@ -70,7 +60,7 @@ AutoReq: no
7060

7161
# unpack rocprofiler-register
7262
mkdir src
73-
tar xavf %{SOURCE34} -C src
63+
tar xavf %{SOURCE24} -C src
7464

7565
%build
7666
rpm2cpio %{SOURCE0} | cpio -idmv
@@ -97,16 +87,6 @@ rpm2cpio %{SOURCE20} | cpio -idmv
9787
rpm2cpio %{SOURCE21} | cpio -idmv
9888
rpm2cpio %{SOURCE22} | cpio -idmv
9989
rpm2cpio %{SOURCE23} | cpio -idmv
100-
rpm2cpio %{SOURCE24} | cpio -idmv
101-
rpm2cpio %{SOURCE25} | cpio -idmv
102-
rpm2cpio %{SOURCE26} | cpio -idmv
103-
rpm2cpio %{SOURCE27} | cpio -idmv
104-
rpm2cpio %{SOURCE28} | cpio -idmv
105-
rpm2cpio %{SOURCE29} | cpio -idmv
106-
rpm2cpio %{SOURCE30} | cpio -idmv
107-
rpm2cpio %{SOURCE31} | cpio -idmv
108-
rpm2cpio %{SOURCE32} | cpio -idmv
109-
rpm2cpio %{SOURCE33} | cpio -idmv
11090

11191
# build rocprofiler-register
11292
sed -i -e 's|add_subdirectory(external)|find_package(fmt REQUIRED)\nadd_subdirectory(external)|' src/%{rocprofiler_register_pkg}/CMakeLists.txt
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<tool name="libfabric" version="@TOOL_VERSION@" revision="1">
2+
<lib name="fabric"/>
3+
<client>
4+
<environment name="LIBFABRIC_BASE" default="@TOOL_ROOT@"/>
5+
<environment name="LIBDIR" default="$LIBFABRIC_BASE/lib"/>
6+
<environment name="INCLUDE" default="$LIBFABRIC_BASE/include"/>
7+
</client>
8+
</tool>

scram-tools.file/tools/rdma-core/rdma-core.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,7 @@
55
<environment name="LIBDIR" default="$RDMA_CORE_BASE/lib64"/>
66
<environment name="INCLUDE" default="$RDMA_CORE_BASE/include"/>
77
</client>
8+
<runtime name="PATH" value="$RDMA_CORE_BASE/bin" type="path"/>
89
<runtime name="ROOT_INCLUDE_PATH" value="$INCLUDE" type="path"/>
10+
<runtime name="VERBS_CONFIG_DIR" value="$RDMA_CORE_BASE/etc/libibverbs.d" type="path"/>
911
</tool>

ucx.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
### RPM external ucx 1.17.0
1+
### RPM external ucx 1.18.1
22
Source: https://github.com/openucx/%{n}/archive/refs/tags/v%{realversion}.tar.gz
33
BuildRequires: autotools
44
%{!?without_cuda:Requires: cuda gdrcopy}

0 commit comments

Comments
 (0)