From 0a99d45f4744e8471866a38586e10f298d0d2805 Mon Sep 17 00:00:00 2001 From: Peter Josef Scheibel Date: Mon, 26 Feb 2024 16:51:37 -0800 Subject: [PATCH 1/3] remove version locking from experiment config; achieve this with a mixin package --- experiments/gromacs/rocm/ramble.yaml | 4 ---- repo/gromacs/package.py | 3 ++- repo/rocm-consistency/package.py | 36 ++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 repo/rocm-consistency/package.py diff --git a/experiments/gromacs/rocm/ramble.yaml b/experiments/gromacs/rocm/ramble.yaml index 00ad3e035..e6dd214ea 100644 --- a/experiments/gromacs/rocm/ramble.yaml +++ b/experiments/gromacs/rocm/ramble.yaml @@ -53,10 +53,6 @@ ramble: environments: gromacs: packages: - - hip543 - - hsa-rocr-dev543 - - blas-rocm543 - - lapack-rocm543 - mpi-rocm-no-gtl - hipsycl - fftw diff --git a/repo/gromacs/package.py b/repo/gromacs/package.py index 99f80170f..24384de47 100644 --- a/repo/gromacs/package.py +++ b/repo/gromacs/package.py @@ -8,9 +8,10 @@ import llnl.util.filesystem as fs from spack.package import * +from spack.pkg.benchpark.rocm_consistency import RocmConsistency as RocmConsistency -class Gromacs(CMakePackage, CudaPackage, ROCmPackage): +class Gromacs(CMakePackage, CudaPackage, ROCmPackage, RocmConsistency): """GROMACS is a molecular dynamics package primarily designed for simulations of proteins, lipids and nucleic acids. It was originally developed in the Biophysical Chemistry department of University of Groningen, and is now diff --git a/repo/rocm-consistency/package.py b/repo/rocm-consistency/package.py new file mode 100644 index 000000000..7f7858d8e --- /dev/null +++ b/repo/rocm-consistency/package.py @@ -0,0 +1,36 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * +from spack.package_base import PackageBase + + +class RocmConsistency(PackageBase): + with when("+rocm"): + for ver in [ + "5.1.0", + "5.1.3", + "5.2.0", + "5.2.1", + "5.2.3", + "5.3.0", + "5.3.3", + "5.4.0", + "5.4.3", + "5.5.0", + "5.5.1", + "5.6.0", + "5.6.1", + "5.7.0", + "5.7.1", + "6.0.0", + "6.0.2", + ]: + depends_on(f"hsakmt-roct@{ver}", when=f"^hip@{ver}") + depends_on(f"hsa-rocr-dev@{ver}", when=f"^hip@{ver}") + depends_on(f"comgr@{ver}", when=f"hip@{ver}") + depends_on(f"llvm-amdgpu@{ver} +rocm-device-libs", when=f"hip@{ver}") + depends_on(f"rocminfo@{ver}", when=f"hip@{ver}") + depends_on(f"roctracer-dev-api@{ver}", when=f"hip@{ver}") From 5870d5f37f9a88149c1e698c38700bb37ec18eba Mon Sep 17 00:00:00 2001 From: Peter Josef Scheibel Date: Mon, 26 Feb 2024 17:46:33 -0800 Subject: [PATCH 2/3] add needed externals, proper dependency reference for mixin --- .../auxiliary_software_files/packages.yaml | 21 +++++++++++++++++++ repo/rocm-consistency/package.py | 8 +++---- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/configs/LLNL-Tioga-HPECray-zen3-MI250X-Slingshot/auxiliary_software_files/packages.yaml b/configs/LLNL-Tioga-HPECray-zen3-MI250X-Slingshot/auxiliary_software_files/packages.yaml index 59edc4edb..ad3d858cb 100644 --- a/configs/LLNL-Tioga-HPECray-zen3-MI250X-Slingshot/auxiliary_software_files/packages.yaml +++ b/configs/LLNL-Tioga-HPECray-zen3-MI250X-Slingshot/auxiliary_software_files/packages.yaml @@ -187,6 +187,27 @@ packages: prefix: /opt/rocm-5.4.3/ - spec: hipblas@5.5.1 prefix: /opt/rocm-5.5.1/ + hsakmt-roct: + buildable: false + externals: + - spec: hsakmt-roct@5.4.3 + prefix: /opt/rocm-5.4.3/ + - spec: hsakmt-roct@5.5.1 + prefix: /opt/rocm-5.5.1/ + roctracer-dev-api: + buildable: false + externals: + - spec: roctracer-dev-api@5.4.3 + prefix: /opt/rocm-5.4.3/ + - spec: roctracer-dev-api@5.5.1 + prefix: /opt/rocm-5.5.1/ + rocminfo: + buildable: false + externals: + - spec: rocminfo@5.4.3 + prefix: /opt/rocm-5.4.3/ + - spec: rocminfo@5.5.1 + prefix: /opt/rocm-5.5.1/ llvm-amdgpu: externals: - spec: llvm-amdgpu@5.4.3 diff --git a/repo/rocm-consistency/package.py b/repo/rocm-consistency/package.py index 7f7858d8e..bed210ef5 100644 --- a/repo/rocm-consistency/package.py +++ b/repo/rocm-consistency/package.py @@ -30,7 +30,7 @@ class RocmConsistency(PackageBase): ]: depends_on(f"hsakmt-roct@{ver}", when=f"^hip@{ver}") depends_on(f"hsa-rocr-dev@{ver}", when=f"^hip@{ver}") - depends_on(f"comgr@{ver}", when=f"hip@{ver}") - depends_on(f"llvm-amdgpu@{ver} +rocm-device-libs", when=f"hip@{ver}") - depends_on(f"rocminfo@{ver}", when=f"hip@{ver}") - depends_on(f"roctracer-dev-api@{ver}", when=f"hip@{ver}") + depends_on(f"comgr@{ver}", when=f"^hip@{ver}") + depends_on(f"llvm-amdgpu@{ver} +rocm-device-libs", when=f"^hip@{ver}") + depends_on(f"rocminfo@{ver}", when=f"^hip@{ver}") + depends_on(f"roctracer-dev-api@{ver}", when=f"^hip@{ver}") From 1f16b8b3e5deabc31ac869323f12d97f068c81cb Mon Sep 17 00:00:00 2001 From: Peter Josef Scheibel Date: Tue, 27 Feb 2024 16:27:35 -0800 Subject: [PATCH 3/3] also align rocmcc version w/hip version --- repo/rocm-consistency/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/repo/rocm-consistency/package.py b/repo/rocm-consistency/package.py index bed210ef5..957185939 100644 --- a/repo/rocm-consistency/package.py +++ b/repo/rocm-consistency/package.py @@ -28,6 +28,7 @@ class RocmConsistency(PackageBase): "6.0.0", "6.0.2", ]: + depends_on(f"hip@{ver}", when=f"%rocmcc@{ver} ^hip") depends_on(f"hsakmt-roct@{ver}", when=f"^hip@{ver}") depends_on(f"hsa-rocr-dev@{ver}", when=f"^hip@{ver}") depends_on(f"comgr@{ver}", when=f"^hip@{ver}")