Skip to content

Commit 1dc21b5

Browse files
committed
Update for HPC-X packaging changes and bump default version to 2.19
1 parent d893840 commit 1dc21b5

File tree

3 files changed

+54
-48
lines changed

3 files changed

+54
-48
lines changed

docs/building_blocks.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1475,6 +1475,7 @@ __Parameters__
14751475

14761476

14771477
- __buildlabel__: The build label assigned by Mellanox to the tarball.
1478+
For versions 2.17 and later, the default value is `cuda12`.
14781479
For version 2.16 the default value is `cuda12-gdrcopy2-nccl2.18`.
14791480
For version 2.15 the default value is `cuda12-gdrcopy2-nccl2.17`.
14801481
For version 2.14 the default value is `cuda11-gdrcopy2-nccl2.16`.
@@ -1543,7 +1544,7 @@ distributions the default values are `bzip2`, `numactl-libs`,
15431544
`/usr/local/hpcx`.
15441545

15451546
- __version__: The version of Mellanox HPC-X to install. The default
1546-
value is `2.16`.
1547+
value is `2.19`.
15471548

15481549
__Examples__
15491550

hpccm/building_blocks/hpcx.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ class hpcx(bb_base, hpccm.templates.envvars, hpccm.templates.ldconfig,
4949
# Parameters
5050
5151
buildlabel: The build label assigned by Mellanox to the tarball.
52+
For versions 2.17 and later, the default value is `cuda12`.
5253
For version 2.16 the default value is `cuda12-gdrcopy2-nccl2.18`.
5354
For version 2.15 the default value is `cuda12-gdrcopy2-nccl2.17`.
5455
For version 2.14 the default value is `cuda11-gdrcopy2-nccl2.16`.
@@ -117,7 +118,7 @@ class hpcx(bb_base, hpccm.templates.envvars, hpccm.templates.ldconfig,
117118
`/usr/local/hpcx`.
118119
119120
version: The version of Mellanox HPC-X to install. The default
120-
value is `2.16`.
121+
value is `2.19`.
121122
122123
# Examples
123124
@@ -146,13 +147,15 @@ def __init__(self, **kwargs):
146147
self.__ospackages = kwargs.get('ospackages', []) # Filled in by _distro()
147148
self.__packages = kwargs.get('packages', [])
148149
self.__prefix = kwargs.get('prefix', '/usr/local/hpcx')
149-
self.__version = kwargs.get('version', '2.16')
150+
self.__version = kwargs.get('version', '2.19')
150151

151152
self.__commands = [] # Filled in by __setup()
152153
self.__wd = kwargs.get('wd', hpccm.config.g_wd) # working directory
153154

154155
if not self.__buildlabel:
155-
if Version(self.__version) >= Version('2.16'):
156+
if Version(self.__version) >= Version('2.17'):
157+
self.__buildlabel = 'cuda12'
158+
elif Version(self.__version) >= Version('2.16'):
156159
self.__buildlabel = 'cuda12-gdrcopy2-nccl2.18'
157160
elif Version(self.__version) >= Version('2.15'):
158161
self.__buildlabel = 'cuda12-gdrcopy2-nccl2.17'
@@ -218,7 +221,9 @@ def __distro(self):
218221

219222
elif hpccm.config.g_linux_distro == linux_distro.CENTOS:
220223
if not self.__oslabel:
221-
if hpccm.config.g_linux_version >= Version('8.0'):
224+
if hpccm.config.g_linux_version >= Version('9.0'):
225+
self.__oslabel = 'redhat9'
226+
elif hpccm.config.g_linux_version >= Version('8.0'):
222227
if Version(self.__version) >= Version('2.10'):
223228
self.__oslabel = 'redhat8'
224229
else:

test/test_hpcx.py

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -31,37 +31,14 @@ def setUp(self):
3131
"""Disable logging output messages"""
3232
logging.disable(logging.ERROR)
3333

34-
@x86_64
35-
@ubuntu18
36-
@docker
37-
def test_defaults_ubuntu18(self):
38-
"""Default hpcx building block"""
39-
h = hpcx()
40-
self.assertEqual(str(h),
41-
r'''# Mellanox HPC-X version 2.16
42-
RUN apt-get update -y && \
43-
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
44-
bzip2 \
45-
libnuma1 \
46-
openssh-client \
47-
tar \
48-
wget && \
49-
rm -rf /var/lib/apt/lists/*
50-
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://content.mellanox.com/hpc/hpc-x/v2.16/hpcx-v2.16-gcc-mlnx_ofed-ubuntu18.04-cuda12-gdrcopy2-nccl2.18-x86_64.tbz && \
51-
mkdir -p /var/tmp && tar -x -f /var/tmp/hpcx-v2.16-gcc-mlnx_ofed-ubuntu18.04-cuda12-gdrcopy2-nccl2.18-x86_64.tbz -C /var/tmp -j && \
52-
cp -a /var/tmp/hpcx-v2.16-gcc-mlnx_ofed-ubuntu18.04-cuda12-gdrcopy2-nccl2.18-x86_64 /usr/local/hpcx && \
53-
echo "source /usr/local/hpcx/hpcx-init-ompi.sh" >> /etc/bash.bashrc && \
54-
echo "hpcx_load" >> /etc/bash.bashrc && \
55-
rm -rf /var/tmp/hpcx-v2.16-gcc-mlnx_ofed-ubuntu18.04-cuda12-gdrcopy2-nccl2.18-x86_64.tbz /var/tmp/hpcx-v2.16-gcc-mlnx_ofed-ubuntu18.04-cuda12-gdrcopy2-nccl2.18-x86_64''')
56-
5734
@x86_64
5835
@ubuntu20
5936
@docker
6037
def test_defaults_ubuntu20(self):
6138
"""Default hpcx building block"""
6239
h = hpcx()
6340
self.assertEqual(str(h),
64-
r'''# Mellanox HPC-X version 2.16
41+
r'''# Mellanox HPC-X version 2.19
6542
RUN apt-get update -y && \
6643
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
6744
bzip2 \
@@ -70,12 +47,12 @@ def test_defaults_ubuntu20(self):
7047
tar \
7148
wget && \
7249
rm -rf /var/lib/apt/lists/*
73-
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://content.mellanox.com/hpc/hpc-x/v2.16/hpcx-v2.16-gcc-mlnx_ofed-ubuntu20.04-cuda12-gdrcopy2-nccl2.18-x86_64.tbz && \
74-
mkdir -p /var/tmp && tar -x -f /var/tmp/hpcx-v2.16-gcc-mlnx_ofed-ubuntu20.04-cuda12-gdrcopy2-nccl2.18-x86_64.tbz -C /var/tmp -j && \
75-
cp -a /var/tmp/hpcx-v2.16-gcc-mlnx_ofed-ubuntu20.04-cuda12-gdrcopy2-nccl2.18-x86_64 /usr/local/hpcx && \
50+
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://content.mellanox.com/hpc/hpc-x/v2.19/hpcx-v2.19-gcc-mlnx_ofed-ubuntu20.04-cuda12-x86_64.tbz && \
51+
mkdir -p /var/tmp && tar -x -f /var/tmp/hpcx-v2.19-gcc-mlnx_ofed-ubuntu20.04-cuda12-x86_64.tbz -C /var/tmp -j && \
52+
cp -a /var/tmp/hpcx-v2.19-gcc-mlnx_ofed-ubuntu20.04-cuda12-x86_64 /usr/local/hpcx && \
7653
echo "source /usr/local/hpcx/hpcx-init-ompi.sh" >> /etc/bash.bashrc && \
7754
echo "hpcx_load" >> /etc/bash.bashrc && \
78-
rm -rf /var/tmp/hpcx-v2.16-gcc-mlnx_ofed-ubuntu20.04-cuda12-gdrcopy2-nccl2.18-x86_64.tbz /var/tmp/hpcx-v2.16-gcc-mlnx_ofed-ubuntu20.04-cuda12-gdrcopy2-nccl2.18-x86_64''')
55+
rm -rf /var/tmp/hpcx-v2.19-gcc-mlnx_ofed-ubuntu20.04-cuda12-x86_64.tbz /var/tmp/hpcx-v2.19-gcc-mlnx_ofed-ubuntu20.04-cuda12-x86_64''')
7956

8057
@x86_64
8158
@centos
@@ -84,20 +61,20 @@ def test_defaults_centos7(self):
8461
"""Default mlnx_ofed building block"""
8562
h = hpcx()
8663
self.assertEqual(str(h),
87-
r'''# Mellanox HPC-X version 2.16
64+
r'''# Mellanox HPC-X version 2.19
8865
RUN yum install -y \
8966
bzip2 \
9067
numactl-libs \
9168
openssh-clients \
9269
tar \
9370
wget && \
9471
rm -rf /var/cache/yum/*
95-
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://content.mellanox.com/hpc/hpc-x/v2.16/hpcx-v2.16-gcc-mlnx_ofed-redhat7-cuda12-gdrcopy2-nccl2.18-x86_64.tbz && \
96-
mkdir -p /var/tmp && tar -x -f /var/tmp/hpcx-v2.16-gcc-mlnx_ofed-redhat7-cuda12-gdrcopy2-nccl2.18-x86_64.tbz -C /var/tmp -j && \
97-
cp -a /var/tmp/hpcx-v2.16-gcc-mlnx_ofed-redhat7-cuda12-gdrcopy2-nccl2.18-x86_64 /usr/local/hpcx && \
72+
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://content.mellanox.com/hpc/hpc-x/v2.19/hpcx-v2.19-gcc-mlnx_ofed-redhat7-cuda12-x86_64.tbz && \
73+
mkdir -p /var/tmp && tar -x -f /var/tmp/hpcx-v2.19-gcc-mlnx_ofed-redhat7-cuda12-x86_64.tbz -C /var/tmp -j && \
74+
cp -a /var/tmp/hpcx-v2.19-gcc-mlnx_ofed-redhat7-cuda12-x86_64 /usr/local/hpcx && \
9875
echo "source /usr/local/hpcx/hpcx-init-ompi.sh" >> /etc/bashrc && \
9976
echo "hpcx_load" >> /etc/bashrc && \
100-
rm -rf /var/tmp/hpcx-v2.16-gcc-mlnx_ofed-redhat7-cuda12-gdrcopy2-nccl2.18-x86_64.tbz /var/tmp/hpcx-v2.16-gcc-mlnx_ofed-redhat7-cuda12-gdrcopy2-nccl2.18-x86_64''')
77+
rm -rf /var/tmp/hpcx-v2.19-gcc-mlnx_ofed-redhat7-cuda12-x86_64.tbz /var/tmp/hpcx-v2.19-gcc-mlnx_ofed-redhat7-cuda12-x86_64''')
10178

10279
@x86_64
10380
@centos8
@@ -106,20 +83,20 @@ def test_defaults_centos8(self):
10683
"""Default mlnx_ofed building block"""
10784
h = hpcx()
10885
self.assertEqual(str(h),
109-
r'''# Mellanox HPC-X version 2.16
86+
r'''# Mellanox HPC-X version 2.19
11087
RUN yum install -y \
11188
bzip2 \
11289
numactl-libs \
11390
openssh-clients \
11491
tar \
11592
wget && \
11693
rm -rf /var/cache/yum/*
117-
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://content.mellanox.com/hpc/hpc-x/v2.16/hpcx-v2.16-gcc-mlnx_ofed-redhat8-cuda12-gdrcopy2-nccl2.18-x86_64.tbz && \
118-
mkdir -p /var/tmp && tar -x -f /var/tmp/hpcx-v2.16-gcc-mlnx_ofed-redhat8-cuda12-gdrcopy2-nccl2.18-x86_64.tbz -C /var/tmp -j && \
119-
cp -a /var/tmp/hpcx-v2.16-gcc-mlnx_ofed-redhat8-cuda12-gdrcopy2-nccl2.18-x86_64 /usr/local/hpcx && \
94+
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://content.mellanox.com/hpc/hpc-x/v2.19/hpcx-v2.19-gcc-mlnx_ofed-redhat8-cuda12-x86_64.tbz && \
95+
mkdir -p /var/tmp && tar -x -f /var/tmp/hpcx-v2.19-gcc-mlnx_ofed-redhat8-cuda12-x86_64.tbz -C /var/tmp -j && \
96+
cp -a /var/tmp/hpcx-v2.19-gcc-mlnx_ofed-redhat8-cuda12-x86_64 /usr/local/hpcx && \
12097
echo "source /usr/local/hpcx/hpcx-init-ompi.sh" >> /etc/bashrc && \
12198
echo "hpcx_load" >> /etc/bashrc && \
122-
rm -rf /var/tmp/hpcx-v2.16-gcc-mlnx_ofed-redhat8-cuda12-gdrcopy2-nccl2.18-x86_64.tbz /var/tmp/hpcx-v2.16-gcc-mlnx_ofed-redhat8-cuda12-gdrcopy2-nccl2.18-x86_64''')
99+
rm -rf /var/tmp/hpcx-v2.19-gcc-mlnx_ofed-redhat8-cuda12-x86_64.tbz /var/tmp/hpcx-v2.19-gcc-mlnx_ofed-redhat8-cuda12-x86_64''')
123100

124101
@x86_64
125102
@ubuntu
@@ -283,6 +260,29 @@ def test_ldconfig_multi_thread(self):
283260
PKG_CONFIG_PATH=/usr/local/hpcx/hcoll/lib/pkgconfig:/usr/local/hpcx/ompi/lib/pkgconfig:/usr/local/hpcx/sharp/lib/pkgconfig:/usr/local/hpcx/ucx/mt/lib/pkgconfig:$PKG_CONFIG_PATH \
284261
SHMEM_HOME=/usr/local/hpcx/ompi''')
285262

263+
@x86_64
264+
@ubuntu18
265+
@docker
266+
def test_version216_ubuntu18(self):
267+
"""Default hpcx building block"""
268+
h = hpcx(version='2.16')
269+
self.assertEqual(str(h),
270+
r'''# Mellanox HPC-X version 2.16
271+
RUN apt-get update -y && \
272+
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
273+
bzip2 \
274+
libnuma1 \
275+
openssh-client \
276+
tar \
277+
wget && \
278+
rm -rf /var/lib/apt/lists/*
279+
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://content.mellanox.com/hpc/hpc-x/v2.16/hpcx-v2.16-gcc-mlnx_ofed-ubuntu18.04-cuda12-gdrcopy2-nccl2.18-x86_64.tbz && \
280+
mkdir -p /var/tmp && tar -x -f /var/tmp/hpcx-v2.16-gcc-mlnx_ofed-ubuntu18.04-cuda12-gdrcopy2-nccl2.18-x86_64.tbz -C /var/tmp -j && \
281+
cp -a /var/tmp/hpcx-v2.16-gcc-mlnx_ofed-ubuntu18.04-cuda12-gdrcopy2-nccl2.18-x86_64 /usr/local/hpcx && \
282+
echo "source /usr/local/hpcx/hpcx-init-ompi.sh" >> /etc/bash.bashrc && \
283+
echo "hpcx_load" >> /etc/bash.bashrc && \
284+
rm -rf /var/tmp/hpcx-v2.16-gcc-mlnx_ofed-ubuntu18.04-cuda12-gdrcopy2-nccl2.18-x86_64.tbz /var/tmp/hpcx-v2.16-gcc-mlnx_ofed-ubuntu18.04-cuda12-gdrcopy2-nccl2.18-x86_64''')
285+
286286
@x86_64
287287
@ubuntu22
288288
@docker
@@ -291,7 +291,7 @@ def test_runtime(self):
291291
h = hpcx()
292292
r = h.runtime()
293293
self.assertEqual(r,
294-
r'''# Mellanox HPC-X version 2.16
294+
r'''# Mellanox HPC-X version 2.19
295295
RUN apt-get update -y && \
296296
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
297297
bzip2 \
@@ -300,9 +300,9 @@ def test_runtime(self):
300300
tar \
301301
wget && \
302302
rm -rf /var/lib/apt/lists/*
303-
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://content.mellanox.com/hpc/hpc-x/v2.16/hpcx-v2.16-gcc-mlnx_ofed-ubuntu22.04-cuda12-gdrcopy2-nccl2.18-x86_64.tbz && \
304-
mkdir -p /var/tmp && tar -x -f /var/tmp/hpcx-v2.16-gcc-mlnx_ofed-ubuntu22.04-cuda12-gdrcopy2-nccl2.18-x86_64.tbz -C /var/tmp -j && \
305-
cp -a /var/tmp/hpcx-v2.16-gcc-mlnx_ofed-ubuntu22.04-cuda12-gdrcopy2-nccl2.18-x86_64 /usr/local/hpcx && \
303+
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://content.mellanox.com/hpc/hpc-x/v2.19/hpcx-v2.19-gcc-mlnx_ofed-ubuntu22.04-cuda12-x86_64.tbz && \
304+
mkdir -p /var/tmp && tar -x -f /var/tmp/hpcx-v2.19-gcc-mlnx_ofed-ubuntu22.04-cuda12-x86_64.tbz -C /var/tmp -j && \
305+
cp -a /var/tmp/hpcx-v2.19-gcc-mlnx_ofed-ubuntu22.04-cuda12-x86_64 /usr/local/hpcx && \
306306
echo "source /usr/local/hpcx/hpcx-init-ompi.sh" >> /etc/bash.bashrc && \
307307
echo "hpcx_load" >> /etc/bash.bashrc && \
308-
rm -rf /var/tmp/hpcx-v2.16-gcc-mlnx_ofed-ubuntu22.04-cuda12-gdrcopy2-nccl2.18-x86_64.tbz /var/tmp/hpcx-v2.16-gcc-mlnx_ofed-ubuntu22.04-cuda12-gdrcopy2-nccl2.18-x86_64''')
308+
rm -rf /var/tmp/hpcx-v2.19-gcc-mlnx_ofed-ubuntu22.04-cuda12-x86_64.tbz /var/tmp/hpcx-v2.19-gcc-mlnx_ofed-ubuntu22.04-cuda12-x86_64''')

0 commit comments

Comments
 (0)