From e72d4075bdb2e9c7c41a42605b4bdd95d842443a Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Mon, 15 Apr 2024 10:34:30 -0600 Subject: [PATCH] LAMMPS: add v20240207.1 (#43538) Add workaround for undefined HIP_PATH in older versions --- .../repos/builtin/packages/lammps/package.py | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/lammps/package.py b/var/spack/repos/builtin/packages/lammps/package.py index 0a78196563..aac96002d2 100644 --- a/var/spack/repos/builtin/packages/lammps/package.py +++ b/var/spack/repos/builtin/packages/lammps/package.py @@ -31,12 +31,24 @@ class Lammps(CMakePackage, CudaPackage, ROCmPackage, PythonExtension): # marked deprecated=True # * patch releases older than a stable release should be marked deprecated=True version("develop", branch="develop") - version("20240207", sha256="d518f32de4eb2681f2543be63926411e72072dd7d67c1670c090b5baabed98ac") + version( + "20240207.1", sha256="3ba62c2a1ed463fceedf313a1c3ea2997994aa102379a8d35b525ea424f56776" + ) + version( + "20240207", + sha256="d518f32de4eb2681f2543be63926411e72072dd7d67c1670c090b5baabed98ac", + deprecated=True, + ) version("20231121", sha256="704d8a990874a425bcdfe0245faf13d712231ba23f014a3ebc27bc14398856f1") + version( + "20230802.3", + sha256="6666e28cb90d3ff01cbbda6c81bdb85cf436bbb41604a87f2ab2fa559caa8510", + preferred=True, + ) version( "20230802.2", sha256="3bcecabc9cad08d0a4e4d989b52d29c58505f7ead8ebacf43c9db8d9fd3d564a", - preferred=True, + deprecated=True, ) version( "20230802.1", @@ -358,6 +370,7 @@ class Lammps(CMakePackage, CudaPackage, ROCmPackage, PythonExtension): ) stable_versions = { + "20230802.3", "20230802.2", "20230802.1", "20230802", @@ -862,6 +875,11 @@ def cmake_args(self): if "+rocm" in spec: args.append(self.define("CMAKE_CXX_COMPILER", spec["hip"].hipcc)) + if "@:20231121" in spec: + if "^hip@:5.4" in spec: + args.append(self.define("HIP_PATH", f"{spec['hip'].prefix}/hip")) + elif "^hip@5.5:" in spec: + args.append(self.define("HIP_PATH", spec["hip"].prefix)) return args