diff --git a/easybuild/easyconfigs/h/hwloc-ROCm/hwloc-ROCm-2.11.2-rocm-compilers-19.0.0-ROCm-6.4.1.eb b/easybuild/easyconfigs/h/hwloc-ROCm/hwloc-ROCm-2.11.2-rocm-compilers-19.0.0-ROCm-6.4.1.eb new file mode 100644 index 000000000000..49fde9e373d9 --- /dev/null +++ b/easybuild/easyconfigs/h/hwloc-ROCm/hwloc-ROCm-2.11.2-rocm-compilers-19.0.0-ROCm-6.4.1.eb @@ -0,0 +1,74 @@ +# Author: Aayush Joglekar + +easyblock = 'ConfigureMake' + +name = 'hwloc-ROCm' +version = '2.11.2' +_rocm_version = '6.4.1' + +homepage = 'https://www.open-mpi.org/projects/hwloc/' + +description = """ + The Portable Hardware Locality (hwloc) software package provides a portable + abstraction (across OS, versions, architectures, ...) of the hierarchical + topology of modern architectures, including NUMA memory nodes, sockets, shared + caches, cores and simultaneous multithreading. It also gathers various system + attributes such as cache and memory information as well as the locality of I/O + devices such as network interfaces, InfiniBand HCAs or GPUs. It primarily + aims at helping applications with gathering information about modern computing + hardware so as to exploit it accordingly and efficiently. + + This provides the ROCm and RSMI plugins for hwloc to discover AMD GPUs. +""" + +toolchain = {'name': 'rocm-compilers', 'version': '19.0.0-ROCm-6.4.1'} + +source_urls = ['https://www.open-mpi.org/software/hwloc/v%(version_major_minor)s/downloads/'] +sources = ['hwloc-%(version)s.tar.gz'] +checksums = ['866ac8ef07b350a6a2ba0c6826c37d78e8994dcbcd443bdd2b436350de19d540'] + +builddependencies = [ + ('pkgconf', '2.3.0'), +] + +dependencies = [ + ('hwloc', version), + ('HIP', '6.4.1'), + ('rocm-smi', '7.6.0', f'-ROCm-{_rocm_version}'), + ('numactl', '2.0.19'), +] + +configopts = ' '.join([ + '--enable-plugins', + '--disable-cuda', + '--disable-nvml', + '--with-rocm=$EBROOTHIP', + '--enable-rsmi', + '--disable-cairo', + '--disable-opencl', + '--disable-levelzero', + '--disable-gl', + '--disable-libxml2', + '--disable-pci', + '--disable-libudev', +]) + +# Build ONLY the AMD RSMI plugin +build_cmd = 'cd hwloc && make hwloc_rsmi.la' +install_cmd = f'cp hwloc/.libs/hwloc_rsmi.{SHLIB_EXT} %(installdir)s' + +modextrapaths = { + 'HWLOC_PLUGINS_PATH': '.', +} + +sanity_check_paths = { + 'files': [f'hwloc_rsmi.{SHLIB_EXT}'], + 'dirs': [], +} + +# Verify that hwloc can successfully load the new AMD plugins +sanity_check_commands = [ + 'HWLOC_COMPONENTS_VERBOSE=1 lstopo 2>&1 | grep %(installdir)s' +] + +moduleclass = 'system' diff --git a/easybuild/easyconfigs/o/OSU-Micro-Benchmarks/OSU-Micro-Benchmarks-7.5-rompi-2025a.eb b/easybuild/easyconfigs/o/OSU-Micro-Benchmarks/OSU-Micro-Benchmarks-7.5-rompi-2025a.eb index 36a727acb3e5..93a06772ce79 100644 --- a/easybuild/easyconfigs/o/OSU-Micro-Benchmarks/OSU-Micro-Benchmarks-7.5-rompi-2025a.eb +++ b/easybuild/easyconfigs/o/OSU-Micro-Benchmarks/OSU-Micro-Benchmarks-7.5-rompi-2025a.eb @@ -2,6 +2,7 @@ easyblock = 'ConfigureMake' name = 'OSU-Micro-Benchmarks' version = '7.5' +_rocm_version = '6.4.1' homepage = 'https://mvapich.cse.ohio-state.edu/benchmarks/' description = """OSU Micro-Benchmarks""" @@ -13,9 +14,21 @@ source_urls = ['https://mvapich.cse.ohio-state.edu/download/mvapich/'] sources = [SOURCELOWER_TAR_GZ] checksums = ['1cf84ac5419456202757a757c5f9a4f5c6ecd05c65783c7976421cfd6020b3b3'] +dependencies = [ + ('HIP', _rocm_version), + ('RCCL', '2.22.3'), + ('UCX-ROCm', '1.18.0'), + ('UCC-ROCm', '1.3.0'), +] + +configopts = ' --enable-rocm --with-rocm=$EBROOTHIP --enable-rcclomb --with-rccl=$EBROOTRCCL' + local_benchmark_dirs = [ 'libexec/osu-micro-benchmarks/mpi/%s' % x for x in ['collective', 'one-sided', 'pt2pt', 'startup'] +] + [ + 'libexec/osu-micro-benchmarks/xccl/%s' % x for x in ['collective', 'pt2pt'] ] + modextrapaths = {'PATH': local_benchmark_dirs} sanity_check_paths = { diff --git a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-5.0.7-rocm-compilers-19.0.0-ROCm-6.4.1.eb b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-5.0.7-rocm-compilers-19.0.0-ROCm-6.4.1.eb index 9df1ee3c8b18..e2fcc38a2822 100644 --- a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-5.0.7-rocm-compilers-19.0.0-ROCm-6.4.1.eb +++ b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-5.0.7-rocm-compilers-19.0.0-ROCm-6.4.1.eb @@ -33,12 +33,15 @@ builddependencies = [ dependencies = [ ('zlib', '1.3.1'), ('hwloc', '2.11.2'), + ('hwloc-ROCm', '2.11.2'), ('libevent', '2.1.12'), ('UCX', '1.18.0'), + ('UCX-ROCm', '1.18.0'), ('libfabric', '2.0.0'), ('PMIx', '5.0.6'), ('PRRTE', '3.0.8'), ('UCC', '1.3.0'), + ('UCC-ROCm', '1.3.0'), ('HIP', '6.4.1'), ] @@ -52,8 +55,13 @@ preconfigopts += './autogen.pl --force && ' # Base config options configopts = '--without-xpmem --with-show-load-errors=no ' - -# Point the ROCm flag to the HIP installation +configopts += '--with-pmix=$EBROOTPMIX ' +configopts += '--with-prrte=$EBROOTPRRTE ' +configopts += '--with-libevent=$EBROOTLIBEVENT ' +configopts += '--with-hwloc=$EBROOTHWLOC ' +configopts += '--with-ucx=$EBROOTUCX ' +configopts += '--with-ucc=$EBROOTUCC ' configopts += '--with-rocm=$EBROOTHIP ' +configopts += '--enable-mpi1-compatibility ' moduleclass = 'mpi' diff --git a/easybuild/easyconfigs/p/PMIx/PMIx-5.0.6-rocm-compilers-19.0.0-ROCm-6.4.1.eb b/easybuild/easyconfigs/p/PMIx/PMIx-5.0.6-rocm-compilers-19.0.0-ROCm-6.4.1.eb new file mode 100644 index 000000000000..9b85fe95d1f7 --- /dev/null +++ b/easybuild/easyconfigs/p/PMIx/PMIx-5.0.6-rocm-compilers-19.0.0-ROCm-6.4.1.eb @@ -0,0 +1,50 @@ +# Author: Aayush Joglekar + +easyblock = 'ConfigureMake' + +name = 'PMIx' +version = '5.0.6' + +homepage = 'https://pmix.org/' +description = """Process Management for Exascale Environments +PMI Exascale (PMIx) represents an attempt to +provide an extended version of the PMI standard specifically designed +to support clusters up to and including exascale sizes. The overall +objective of the project is not to branch the existing pseudo-standard +definitions - in fact, PMIx fully supports both of the existing PMI-1 +and PMI-2 APIs - but rather to (a) augment and extend those APIs to +eliminate some current restrictions that impact scalability, and (b) +provide a reference implementation of the PMI-server that demonstrates +the desired level of scalability. +""" + +toolchain = {'name': 'rocm-compilers', 'version': '19.0.0-ROCm-6.4.1'} +toolchainopts = {'pic': True} + +source_urls = ['https://github.com/openpmix/openpmix/releases/download/v%(version)s'] +sources = ['%(namelower)s-%(version)s.tar.bz2'] +checksums = ['ea51baa0fdee688d54bc9f2c11937671381f00de966233eec6fd88807fb46f83'] + +builddependencies = [ + ('Perl', '5.40.0'), + ('pkgconf', '2.3.0'), +] + +dependencies = [ + ('libevent', '2.1.12'), + ('zlib', '1.3.1'), + ('hwloc-ROCm', '2.11.2'), +] + +configopts = ' --with-libevent=$EBROOTLIBEVENT --with-zlib=$EBROOTZLIB' +configopts += ' --with-hwloc=$EBROOTHWLOC' +configopts += ' --enable-pmix-binaries' + +buildopts = 'V=1' + +sanity_check_paths = { + 'files': ['bin/pevent', 'bin/plookup', 'bin/pmix_info', 'bin/pps'], + 'dirs': ['etc', 'include', 'lib', 'share'] +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/p/PRRTE/PRRTE-3.0.8-rocm-compilers-19.0.0-ROCm-6.4.1.eb b/easybuild/easyconfigs/p/PRRTE/PRRTE-3.0.8-rocm-compilers-19.0.0-ROCm-6.4.1.eb new file mode 100644 index 000000000000..7ebfa03fd029 --- /dev/null +++ b/easybuild/easyconfigs/p/PRRTE/PRRTE-3.0.8-rocm-compilers-19.0.0-ROCm-6.4.1.eb @@ -0,0 +1,41 @@ +# Author: Aayush Joglekar + +easyblock = 'ConfigureMake' + +name = 'PRRTE' +version = '3.0.8' + +homepage = 'https://docs.prrte.org/' +description = """PRRTE is the PMIx Reference RunTime Environment""" + +toolchain = {'name': 'rocm-compilers', 'version': '19.0.0-ROCm-6.4.1'} +toolchainopts = {'pic': True} + +source_urls = ['https://github.com/openpmix/prrte/releases/download/v%(version)s'] +sources = ['%(namelower)s-%(version)s.tar.bz2'] +checksums = ['e798192fa0ab38172818a109a6c89bcc37e4b1123ca150d8c115dee5231750de'] + +builddependencies = [('binutils', '2.42')] + +dependencies = [ + ('libevent', '2.1.12'), + ('hwloc-ROCm', '2.11.2'), + # also picks up rocm-compilers version + ('PMIx', '5.0.6'), +] + +configopts = ' --with-libevent=$EBROOTLIBEVENT' +configopts += ' --with-hwloc=$EBROOTHWLOC --with-pmix=$EBROOTPMIX' + +buildopts = 'V=1' + +local_binaries = ['prte', 'prte_info', 'prterun', 'prun', 'pterm'] + +sanity_check_paths = { + 'files': ['bin/%s' % x for x in local_binaries] + ['lib/libprrte.%s' % SHLIB_EXT], + 'dirs': ['etc', 'include', 'share'] +} + +sanity_check_commands = ['%s --version' % x for x in local_binaries] + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/u/UCC-ROCm/UCC-ROCm-1.3.0-rocm-compilers-19.0.0-ROCm-6.4.1.eb b/easybuild/easyconfigs/u/UCC-ROCm/UCC-ROCm-1.3.0-rocm-compilers-19.0.0-ROCm-6.4.1.eb new file mode 100644 index 000000000000..2116d916bcd8 --- /dev/null +++ b/easybuild/easyconfigs/u/UCC-ROCm/UCC-ROCm-1.3.0-rocm-compilers-19.0.0-ROCm-6.4.1.eb @@ -0,0 +1,59 @@ +# Author: Aayush Joglekar + +easyblock = 'ConfigureMake' + +name = 'UCC-ROCm' +version = '1.3.0' + +homepage = 'https://www.openucx.org/' +description = """UCC (Unified Collective Communication) is a collective +communication operations API and library. This module adds the UCC ROCm +support (ROCm memory components and RCCL transport).""" + +toolchain = {'name': 'rocm-compilers', 'version': '19.0.0-ROCm-6.4.1'} +toolchainopts = {'pic': True} + +source_urls = ['https://github.com/openucx/ucc/archive/refs/tags'] +sources = ['v%(version)s.tar.gz'] +patches = [ + 'UCC-ROCm-1.3.0_use_rocm_eessi_paths.patch', +] +checksums = [ + {'v1.3.0.tar.gz': 'b56379abe5f1c125bfa83be305d78d81a64aa271b7b5fff0ac17b86725ff3acf'}, + {'UCC-ROCm-1.3.0_use_rocm_eessi_paths.patch': '66c2904fd49124228149d8d2bcc4c0a3e5eaf8fb11b82ffba7df8b84d4ff7c18'}, +] + +builddependencies = [ + ('Autotools', '20240712'), + ('pkgconf', '2.3.0'), +] + +dependencies = [ + ('UCC', version), + ('hwloc-ROCm', '2.11.2'), + ('UCX-ROCm', '1.18.0'), + ('HIP', '6.4.1'), + ('RCCL', '2.22.3'), +] + +preconfigopts = './autogen.sh && ' + +configopts = '--with-rccl=$EBROOTRCCL --with-rocm=$EBROOTHIP ' + +buildopts = '-C src/components/mc/rocm V=1 && make -C src/components/tl/rccl V=1' +installopts = '-C src/components/mc/rocm install && make -C src/components/tl/rccl install' + +sanity_check_paths = { + 'files': [ + 'lib/ucc/libucc_mc_rocm.%s' % SHLIB_EXT, + 'lib/ucc/libucc_tl_rccl.%s' % SHLIB_EXT + ], + 'dirs': ['lib/ucc'] +} + +sanity_check_commands = ["ucc_info -c | grep -iE 'rocm|rccl'"] + +# Ensure UCC knows where to find these external plugins at runtime +modextrapaths = {'EB_UCC_EXTRA_COMPONENT_PATH': 'lib/ucc'} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/u/UCC-ROCm/UCC-ROCm-1.3.0_use_rocm_eessi_paths.patch b/easybuild/easyconfigs/u/UCC-ROCm/UCC-ROCm-1.3.0_use_rocm_eessi_paths.patch new file mode 100644 index 000000000000..30ae188b0d7f --- /dev/null +++ b/easybuild/easyconfigs/u/UCC-ROCm/UCC-ROCm-1.3.0_use_rocm_eessi_paths.patch @@ -0,0 +1,52 @@ +diff --git a/config/m4/rocm.m4 b/config/m4/rocm.m4 +index c7c4ca14..cc89dc47 100644 +--- a/config/m4/rocm.m4 ++++ b/config/m4/rocm.m4 +@@ -28,8 +28,8 @@ done]) + # Parse value of ARG into appropriate LIBS, LDFLAGS, and + # CPPFLAGS variables. + AC_DEFUN([ROCM_BUILD_FLAGS], +- $4="-I$1/include/hsa -I$1/include" +- $3="-L$1/lib -L$1/lib64 -L$1/hsa/lib" ++ $4="-I$EBROOTROCMMINLLVM/include/hsa -I$1/include" ++ $3="-L$EBROOTROCMMINLLVM/lib -L$1/lib -L$1/lib64" + $2="-lhsa-runtime64 -lhsakmt" + $5="$1" + ) +@@ -39,8 +39,8 @@ AC_DEFUN([ROCM_BUILD_FLAGS], + # Parse value of ARG into appropriate LIBS, LDFLAGS, and + # CPPFLAGS variables. + AC_DEFUN([HIP_BUILD_FLAGS], +- $4="-D__HIP_PLATFORM_AMD__ -I$1/include/hip -I$1/include -I$1/llvm/include" +- $3="-L$1/lib -L$1/llvm/lib" ++ $4="-D__HIP_PLATFORM_AMD__ -I$1/include/hip -I$1/include -I$EBROOTROCMMINLLVM/include" ++ $3="-L$1/lib -L$EBROOTROCMMINLLVM/lib" + $2="-lamdhip64" + ) + +diff --git a/src/components/mc/rocm/Makefile.am b/src/components/mc/rocm/Makefile.am +index b97ef90f..2aff0e4a 100644 +--- a/src/components/mc/rocm/Makefile.am ++++ b/src/components/mc/rocm/Makefile.am +@@ -15,7 +15,7 @@ libucc_mc_rocm_la_CPPFLAGS = $(AM_CPPFLAGS) $(HIP_CPPFLAGS) $(ROCM_CPPFLAGS) $(B + libucc_mc_rocm_la_CFLAGS = $(BASE_CFLAGS) + libucc_mc_rocm_la_LDFLAGS = -version-info $(SOVERSION) --as-needed $(HIP_LDFLAGS) $(ROCM_LDFLAGS) + libucc_mc_rocm_la_LIBADD = $(HIP_LIBS) $(ROCM_LIBS) \ +- $(UCC_TOP_BUILDDIR)/src/libucc.la ++ -lucc + + include $(top_srcdir)/config/module.am + endif +diff --git a/src/components/tl/rccl/Makefile.am b/src/components/tl/rccl/Makefile.am +index f3da3fb6..8a3888e9 100644 +--- a/src/components/tl/rccl/Makefile.am ++++ b/src/components/tl/rccl/Makefile.am +@@ -23,7 +23,7 @@ libucc_tl_rccl_la_SOURCES = $(sources) + libucc_tl_rccl_la_CPPFLAGS = $(AM_CPPFLAGS) $(BASE_CPPFLAGS) $(ROCM_CPPFLAGS) $(HIP_CPPFLAGS) $(RCCL_CPPFLAGS) + libucc_tl_rccl_la_CFLAGS = $(BASE_CFLAGS) + libucc_tl_rccl_la_LDFLAGS = -version-info $(SOVERSION) --as-needed $(ROCM_LDFLAGS) $(HIP_LDFLAGS) $(RCCL_LDFLAGS) +-libucc_tl_rccl_la_LIBADD = $(ROCM_LIBS) $(HIP_LIBS) $(RCCL_LIBADD) $(UCC_TOP_BUILDDIR)/src/libucc.la ++libucc_tl_rccl_la_LIBADD = $(ROCM_LIBS) $(HIP_LIBS) $(RCCL_LIBADD) -lucc + + include $(top_srcdir)/config/module.am + diff --git a/easybuild/easyconfigs/u/UCX-ROCm/UCX-ROCm-1.11.2_fix_hsa+hip_include_paths.patch b/easybuild/easyconfigs/u/UCX-ROCm/UCX-ROCm-1.11.2_fix_hsa+hip_include_paths.patch deleted file mode 100644 index a29251bbc506..000000000000 --- a/easybuild/easyconfigs/u/UCX-ROCm/UCX-ROCm-1.11.2_fix_hsa+hip_include_paths.patch +++ /dev/null @@ -1,149 +0,0 @@ -Fix hsa and hip include path - -Åke Sandgren, 2023-01-03 -diff -ru ucx-1.11.2.orig/config/m4/rocm.m4 ucx-1.11.2/config/m4/rocm.m4 ---- ucx-1.11.2.orig/config/m4/rocm.m4 2021-02-27 02:18:15.000000000 +0100 -+++ ucx-1.11.2/config/m4/rocm.m4 2023-01-03 09:23:39.310360596 +0100 -@@ -84,9 +84,9 @@ - - rocm_happy=yes - AS_IF([test "x$rocm_happy" = xyes], -- [AC_CHECK_HEADERS([hsa.h], [rocm_happy=yes], [rocm_happy=no])]) -+ [AC_CHECK_HEADERS([hsa/hsa.h], [rocm_happy=yes], [rocm_happy=no])]) - AS_IF([test "x$rocm_happy" = xyes], -- [AC_CHECK_HEADERS([hsa_ext_amd.h], [rocm_happy=yes], [rocm_happy=no])]) -+ [AC_CHECK_HEADERS([hsa/hsa_ext_amd.h], [rocm_happy=yes], [rocm_happy=no])]) - AS_IF([test "x$rocm_happy" = xyes], - [AC_CHECK_LIB([hsa-runtime64], [hsa_init], [rocm_happy=yes], [rocm_happy=no])]) - -@@ -111,7 +111,7 @@ - hip_happy=no - AC_CHECK_LIB([hip_hcc], [hipFree], [AC_MSG_WARN([Please install ROCm-3.7.0 or above])], [hip_happy=yes]) - AS_IF([test "x$hip_happy" = xyes], -- [AC_CHECK_HEADERS([hip_runtime.h], [hip_happy=yes], [hip_happy=no])]) -+ [AC_CHECK_HEADERS([hip/hip_runtime.h], [hip_happy=yes], [hip_happy=no])]) - AS_IF([test "x$hip_happy" = xyes], - [AC_CHECK_LIB([amdhip64], [hipFree], [hip_happy=yes], [hip_happy=no])]) - AS_IF([test "x$hip_happy" = xyes], [HIP_CXXFLAGS="--std=gnu++11"], []) -diff -ru ucx-1.11.2.orig/src/ucm/rocm/rocmmem.h ucx-1.11.2/src/ucm/rocm/rocmmem.h ---- ucx-1.11.2.orig/src/ucm/rocm/rocmmem.h 2021-02-27 02:18:15.000000000 +0100 -+++ ucx-1.11.2/src/ucm/rocm/rocmmem.h 2023-01-03 09:25:40.289314597 +0100 -@@ -7,7 +7,7 @@ - #define UCM_ROCMMEM_H_ - - #include --#include -+#include - - /* hsa_amd_memory_pool_allocate */ - hsa_status_t ucm_override_hsa_amd_memory_pool_allocate( -diff -ru ucx-1.11.2.orig/src/uct/rocm/base/rocm_base.h ucx-1.11.2/src/uct/rocm/base/rocm_base.h ---- ucx-1.11.2.orig/src/uct/rocm/base/rocm_base.h 2021-07-10 09:59:16.000000000 +0200 -+++ ucx-1.11.2/src/uct/rocm/base/rocm_base.h 2023-01-03 09:24:10.206096620 +0100 -@@ -9,8 +9,8 @@ - - #include - #include --#include --#include -+#include -+#include - - - hsa_status_t uct_rocm_base_init(void); -diff -ru ucx-1.11.2.orig/src/uct/rocm/copy/rocm_copy_ep.c ucx-1.11.2/src/uct/rocm/copy/rocm_copy_ep.c ---- ucx-1.11.2.orig/src/uct/rocm/copy/rocm_copy_ep.c 2021-09-23 22:36:08.000000000 +0200 -+++ ucx-1.11.2/src/uct/rocm/copy/rocm_copy_ep.c 2023-01-03 09:25:35.457356174 +0100 -@@ -19,7 +19,7 @@ - #include - #include - --#include -+#include - - #define uct_rocm_memcpy_h2d(_d,_s,_l) memcpy((_d),(_s),(_l)) - #define uct_rocm_memcpy_d2h(_d,_s,_l) ucs_memcpy_nontemporal((_d),(_s),(_l)) -diff -ru ucx-1.11.2.orig/src/uct/rocm/copy/rocm_copy_iface.h ucx-1.11.2/src/uct/rocm/copy/rocm_copy_iface.h ---- ucx-1.11.2.orig/src/uct/rocm/copy/rocm_copy_iface.h 2021-02-27 02:18:15.000000000 +0100 -+++ ucx-1.11.2/src/uct/rocm/copy/rocm_copy_iface.h 2023-01-03 09:24:33.245895073 +0100 -@@ -8,7 +8,7 @@ - - #include - --#include -+#include - - #define UCT_ROCM_COPY_TL_NAME "rocm_cpy" - -diff -ru ucx-1.11.2.orig/src/uct/rocm/copy/rocm_copy_md.c ucx-1.11.2/src/uct/rocm/copy/rocm_copy_md.c ---- ucx-1.11.2.orig/src/uct/rocm/copy/rocm_copy_md.c 2021-09-23 22:36:08.000000000 +0200 -+++ ucx-1.11.2/src/uct/rocm/copy/rocm_copy_md.c 2023-01-03 09:25:33.073376690 +0100 -@@ -20,7 +20,7 @@ - #include - #include - --#include -+#include - - static ucs_config_field_t uct_rocm_copy_md_config_table[] = { - {"", "", NULL, -diff -ru ucx-1.11.2.orig/src/uct/rocm/gdr/rocm_gdr_md.c ucx-1.11.2/src/uct/rocm/gdr/rocm_gdr_md.c ---- ucx-1.11.2.orig/src/uct/rocm/gdr/rocm_gdr_md.c 2021-09-23 22:36:08.000000000 +0200 -+++ ucx-1.11.2/src/uct/rocm/gdr/rocm_gdr_md.c 2023-01-03 09:25:37.569338002 +0100 -@@ -18,7 +18,7 @@ - #include - #include - --#include -+#include - - static ucs_config_field_t uct_rocm_gdr_md_config_table[] = { - {"", "", NULL, -diff -ru ucx-1.11.2.orig/src/uct/rocm/ipc/rocm_ipc_iface.h ucx-1.11.2/src/uct/rocm/ipc/rocm_ipc_iface.h ---- ucx-1.11.2.orig/src/uct/rocm/ipc/rocm_ipc_iface.h 2021-02-27 02:18:15.000000000 +0100 -+++ ucx-1.11.2/src/uct/rocm/ipc/rocm_ipc_iface.h 2023-01-03 09:24:27.741943217 +0100 -@@ -9,7 +9,7 @@ - - #include - --#include -+#include - - #define UCT_ROCM_IPC_TL_NAME "rocm_ipc" - -diff -ru ucx-1.11.2.orig/src/uct/rocm/ipc/rocm_ipc_md.h ucx-1.11.2/src/uct/rocm/ipc/rocm_ipc_md.h ---- ucx-1.11.2.orig/src/uct/rocm/ipc/rocm_ipc_md.h 2021-02-27 02:18:15.000000000 +0100 -+++ ucx-1.11.2/src/uct/rocm/ipc/rocm_ipc_md.h 2023-01-03 09:25:30.109402193 +0100 -@@ -7,7 +7,7 @@ - #define ROCM_IPC_MD_H - - #include --#include -+#include - - - extern uct_component_t uct_rocm_ipc_component; -diff -ru ucx-1.11.2.orig/test/gtest/common/mem_buffer.cc ucx-1.11.2/test/gtest/common/mem_buffer.cc ---- ucx-1.11.2.orig/test/gtest/common/mem_buffer.cc 2021-09-23 22:36:08.000000000 +0200 -+++ ucx-1.11.2/test/gtest/common/mem_buffer.cc 2023-01-03 09:32:23.085955061 +0100 -@@ -31,7 +31,7 @@ - #endif - - #if HAVE_ROCM --# include -+# include - - #define ROCM_CALL(_code) \ - do { \ -diff -ru ucx-1.11.2.orig/test/gtest/ucm/rocm_hooks.cc ucx-1.11.2/test/gtest/ucm/rocm_hooks.cc ---- ucx-1.11.2.orig/test/gtest/ucm/rocm_hooks.cc 2021-09-23 22:36:08.000000000 +0200 -+++ ucx-1.11.2/test/gtest/ucm/rocm_hooks.cc 2023-01-03 09:32:26.177929298 +0100 -@@ -5,7 +5,7 @@ - */ - #include - #include --#include -+#include - - static ucm_event_t alloc_event, free_event; - diff --git a/easybuild/easyconfigs/u/UCX-ROCm/UCX-ROCm-1.18.0-rocm-compilers-19.0.0-ROCm-6.4.1.eb b/easybuild/easyconfigs/u/UCX-ROCm/UCX-ROCm-1.18.0-rocm-compilers-19.0.0-ROCm-6.4.1.eb new file mode 100644 index 000000000000..f0899efb55f0 --- /dev/null +++ b/easybuild/easyconfigs/u/UCX-ROCm/UCX-ROCm-1.18.0-rocm-compilers-19.0.0-ROCm-6.4.1.eb @@ -0,0 +1,43 @@ +# Author: Aayush Joglekar + +easyblock = 'EB_UCX_Plugins' + +name = 'UCX-ROCm' +version = '1.18.0' + +homepage = 'http://www.openucx.org/' +description = """Unified Communication X +An open-source production grade communication framework for data centric +and high-performance applications + +This module adds the UCX ROCm support. +""" + +toolchain = {'name': 'rocm-compilers', 'version': '19.0.0-ROCm-6.4.1'} +toolchainopts = {'pic': True} + +source_urls = ['https://github.com/openucx/ucx/releases/download/v%(version)s'] +sources = [{'filename': 'ucx-%(version)s.tar.gz', 'alt_location': 'UCX'}] +patches = [ + 'UCX-ROCm-1.18.0_link_against_existing_UCX_libs.patch', + 'UCX-ROCm-1.18.0_use_rocm_eessi_paths.patch' +] +checksums = [ + {'ucx-1.18.0.tar.gz': 'fa75070f5fa7442731b4ef5fc9549391e147ed3d859afeb1dad2d4513b39dc33'}, + {'UCX-ROCm-1.18.0_link_against_existing_UCX_libs.patch': + '5aa85e428f62a168f2d4e75197c41c6835ed5a9893696cedaf1021858678f08c'}, + {'UCX-ROCm-1.18.0_use_rocm_eessi_paths.patch': 'a36e344d313772e38bb3a5a03959bb63d142964b34695dbf07a40405e6dc1cbd'}, +] + +builddependencies = [ + ('Autotools', '20240712'), + ('pkgconf', '2.3.0'), +] + +dependencies = [ + ('UCX', version), + ('zlib', '1.3.1'), + ('HIP', '6.4.1'), +] + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/u/UCX-ROCm/UCX-ROCm-1.18.0_link_against_existing_UCX_libs.patch b/easybuild/easyconfigs/u/UCX-ROCm/UCX-ROCm-1.18.0_link_against_existing_UCX_libs.patch new file mode 100644 index 000000000000..e8356494e2b5 --- /dev/null +++ b/easybuild/easyconfigs/u/UCX-ROCm/UCX-ROCm-1.18.0_link_against_existing_UCX_libs.patch @@ -0,0 +1,109 @@ +Make CUDA/ROCm/Ze plugins link against the existing ucs/ucm/uct libraries. + +--- a/configure.ac ++++ b/configure.ac +@@ -31,13 +31,13 @@ valgrind_libpath="" + AC_USE_SYSTEM_EXTENSIONS + AC_CONFIG_HEADERS([config.h]) + +-AC_CHECK_PROG(GITBIN, git, yes) +-AS_IF([test x"${GITBIN}" = x"yes"], +- [# remove preceding "refs/heads/" (11 characters) for symbolic ref +- AC_SUBST(SCM_BRANCH, esyscmd([sh -c 'git symbolic-ref --quiet HEAD | sed "s/^.\{11\}//"'])) +- AC_SUBST(SCM_VERSION, esyscmd([sh -c 'git rev-parse --short=7 HEAD']))], +- [AC_SUBST(SCM_BRANCH, "") +- AC_SUBST(SCM_VERSION, "0000000")]) ++#AC_CHECK_PROG(GITBIN, git, yes) ++#AS_IF([test x"${GITBIN}" = x"yes"], ++# [# remove preceding "refs/heads/" (11 characters) for symbolic ref ++# AC_SUBST(SCM_BRANCH, esyscmd([sh -c 'git symbolic-ref --quiet HEAD | sed "s/^.\{11\}//"'])) ++# AC_SUBST(SCM_VERSION, esyscmd([sh -c 'git rev-parse --short=7 HEAD']))], ++# [AC_SUBST(SCM_BRANCH, "") ++# AC_SUBST(SCM_VERSION, "0000000")]) + + AH_TOP([ + #ifndef UCX_CONFIG_H +diff --git a/src/ucm/cuda/Makefile.am b/src/ucm/cuda/Makefile.am +index e8eda0f..31a6d54 100644 +--- a/src/ucm/cuda/Makefile.am ++++ b/src/ucm/cuda/Makefile.am +@@ -9,7 +9,7 @@ if HAVE_CUDA + module_LTLIBRARIES = libucm_cuda.la + libucm_cuda_la_CPPFLAGS = $(BASE_CPPFLAGS) $(CUDA_CPPFLAGS) + libucm_cuda_la_CFLAGS = $(BASE_CFLAGS) $(CUDA_CFLAGS) $(LT_CFLAGS) +-libucm_cuda_la_LIBADD = ../libucm.la $(CUDA_LIBS) $(CUDART_LIBS) ++libucm_cuda_la_LIBADD = -lucm $(CUDA_LIBS) $(CUDART_LIBS) + libucm_cuda_la_LDFLAGS = $(UCM_MODULE_LDFLAGS) \ + $(patsubst %, -Xlinker %, $(CUDA_LDFLAGS)) \ + -version-info $(SOVERSION) +diff --git a/src/ucm/rocm/Makefile.am b/src/ucm/rocm/Makefile.am +index 57545b3..9c86ee3 100644 +--- a/src/ucm/rocm/Makefile.am ++++ b/src/ucm/rocm/Makefile.am +@@ -10,7 +10,7 @@ if HAVE_ROCM + module_LTLIBRARIES = libucm_rocm.la + libucm_rocm_la_CPPFLAGS = $(BASE_CPPFLAGS) $(ROCM_CPPFLAGS) + libucm_rocm_la_CFLAGS = $(BASE_CFLAGS) $(ROCM_CFLAGS) $(LT_CFLAGS) +-libucm_rocm_la_LIBADD = ../libucm.la ++libucm_rocm_la_LIBADD = -lucm + libucm_rocm_la_LDFLAGS = $(UCM_MODULE_LDFLAGS) \ + $(ROCM_LDFLAGS) $(ROCM_LIBS) -version-info $(SOVERSION) \ + $(patsubst %, -Xlinker %, -L$(ROCM_ROOT)/lib -rpath $(ROCM_ROOT)/hip/lib -rpath $(ROCM_ROOT)/lib) \ +diff --git a/src/uct/cuda/Makefile.am b/src/uct/cuda/Makefile.am +index 8c76de0..e804cc5 100644 +--- a/src/uct/cuda/Makefile.am ++++ b/src/uct/cuda/Makefile.am +@@ -11,8 +11,8 @@ module_LTLIBRARIES = libuct_cuda.la + libuct_cuda_la_CPPFLAGS = $(BASE_CPPFLAGS) $(CUDA_CPPFLAGS) + libuct_cuda_la_CFLAGS = $(BASE_CFLAGS) $(CUDA_CFLAGS) $(LT_CFLAGS) + libuct_cuda_la_LDFLAGS = $(CUDA_LDFLAGS) -version-info $(SOVERSION) +-libuct_cuda_la_LIBADD = $(top_builddir)/src/ucs/libucs.la \ +- $(top_builddir)/src/uct/libuct.la \ ++libuct_cuda_la_LIBADD = -lucs \ ++ -luct \ + $(CUDA_LIBS) $(NVML_LIBS) + + noinst_HEADERS = \ +diff --git a/src/uct/cuda/gdr_copy/Makefile.am b/src/uct/cuda/gdr_copy/Makefile.am +index 06ad3df..a1a9757 100644 +--- a/src/uct/cuda/gdr_copy/Makefile.am ++++ b/src/uct/cuda/gdr_copy/Makefile.am +@@ -9,7 +9,7 @@ module_LTLIBRARIES = libuct_cuda_gdrcopy.la + libuct_cuda_gdrcopy_la_CPPFLAGS = $(BASE_CPPFLAGS) $(GDR_COPY_CPPFLAGS) + libuct_cuda_gdrcopy_la_CFLAGS = $(BASE_CFLAGS) $(LT_CFLAGS) + libuct_cuda_gdrcopy_la_LDFLAGS = $(GDR_COPY_LDFLAGS) -version-info $(SOVERSION) +-libuct_cuda_gdrcopy_la_LIBADD = $(top_builddir)/src/ucs/libucs.la \ ++libuct_cuda_gdrcopy_la_LIBADD = -lucs \ + $(top_builddir)/src/uct/cuda/libuct_cuda.la \ + $(GDR_COPY_LIBS) + +diff --git a/src/uct/rocm/Makefile.am b/src/uct/rocm/Makefile.am +index 310ca2e..5caf702 100644 +--- a/src/uct/rocm/Makefile.am ++++ b/src/uct/rocm/Makefile.am +@@ -8,8 +8,8 @@ if HAVE_ROCM + module_LTLIBRARIES = libuct_rocm.la + libuct_rocm_la_CPPFLAGS = $(BASE_CPPFLAGS) $(ROCM_CPPFLAGS) + libuct_rocm_la_CFLAGS = $(BASE_CFLAGS) $(LT_CFLAGS) +-libuct_rocm_la_LIBADD = $(top_builddir)/src/ucs/libucs.la \ +- $(top_builddir)/src/uct/libuct.la ++libuct_rocm_la_LIBADD = -lucs \ ++ -luct + libuct_rocm_la_LDFLAGS = $(ROCM_LDFLAGS) $(ROCM_LIBS) -version-info $(SOVERSION) \ + $(patsubst %, -Xlinker %, -L$(ROCM_ROOT)/lib -rpath $(ROCM_ROOT)/hip/lib -rpath $(ROCM_ROOT)/lib) \ + $(patsubst %, -Xlinker %, --enable-new-dtags) \ +diff --git a/src/uct/ze/Makefile.am b/src/uct/ze/Makefile.am +index c2ef39c..0993647 100644 +--- a/src/uct/ze/Makefile.am ++++ b/src/uct/ze/Makefile.am +@@ -10,8 +10,8 @@ SUBDIRS = . + module_LTLIBRARIES = libuct_ze.la + libuct_ze_la_CPPFLAGS = $(BASE_CPPFLAGS) $(ZE_CPPFLAGS) + libuct_ze_la_CFLAGS = $(BASE_CFLAGS) $(LT_CFLAGS) +-libuct_ze_la_LIBADD = $(top_builddir)/src/ucs/libucs.la \ +- $(top_builddir)/src/uct/libuct.la ++libuct_ze_la_LIBADD = -lucs \ ++ -luct + libuct_ze_la_LDFLAGS = $(ZE_LDFLAGS) $(ZE_LIBS) -version-info $(SOVERSION) \ + $(patsubst %, -Xlinker %, -L$(ZE_ROOT)/lib -rpath $(ZE_ROOT)/hip/lib -rpath $(ZE_ROOT)/lib) \ + $(patsubst %, -Xlinker %, --enable-new-dtags) \ diff --git a/easybuild/easyconfigs/u/UCX-ROCm/UCX-ROCm-1.18.0_use_rocm_eessi_paths.patch b/easybuild/easyconfigs/u/UCX-ROCm/UCX-ROCm-1.18.0_use_rocm_eessi_paths.patch new file mode 100644 index 000000000000..2311669aca2a --- /dev/null +++ b/easybuild/easyconfigs/u/UCX-ROCm/UCX-ROCm-1.18.0_use_rocm_eessi_paths.patch @@ -0,0 +1,20 @@ +Fixes the ROCm discovery logic in config/m4/rocm.m4 by explicitly pointing to +decoupled EESSI header and library paths for the HSA and HIP runtimes. + +Author: Aayush Joglekar (aayush.joglekar@surf.nl) + +diff --git a/config/m4/rocm.m4 b/config/m4/rocm.m4 +index 0190679e8..ff56417a9 100644 +--- a/config/m4/rocm.m4 ++++ b/config/m4/rocm.m4 +@@ -28,8 +28,8 @@ done]) + # Parse value of ARG into appropriate LIBS, LDFLAGS, and + # CPPFLAGS variables. + AC_DEFUN([ROCM_BUILD_FLAGS], +- $4="-I$1/include/hsa -I$1/include" +- $3="-L$1/lib -L$1/lib64 -L$1/hsa/lib" ++ $4="-I$EBROOTROCMMINLLVM/include/hsa -I$1/include" ++ $3="-L$EBROOTROCMMINLLVM/lib -L$1/lib -L$1/lib64" + $2="-lhsa-runtime64 -lhsakmt" + $5="$1" + )