Updates to AMR-Wind: adding new releases and an option to enable new spec option (#48229)

This commit is contained in:
prakash 2024-12-22 10:25:53 -07:00 committed by GitHub
parent 5b1394f1cf
commit 858c7ca1a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,6 +21,11 @@ class AmrWind(CMakePackage, CudaPackage, ROCmPackage):
license("BSD-3-Clause") license("BSD-3-Clause")
version("main", branch="main", submodules=True) version("main", branch="main", submodules=True)
version("3.3.1", tag="v3.3.1", submodules=True)
version("3.3.0", tag="v3.3.0", submodules=True)
version("3.2.3", tag="v3.2.3", submodules=True)
version("3.2.2", tag="v3.2.2", submodules=True)
version("3.2.1", tag="v3.2.1", submodules=True)
version("3.2.0", tag="v3.2.0", submodules=True) version("3.2.0", tag="v3.2.0", submodules=True)
version("3.1.7", tag="v3.1.7", submodules=True) version("3.1.7", tag="v3.1.7", submodules=True)
version("3.1.6", tag="v3.1.6", submodules=True) version("3.1.6", tag="v3.1.6", submodules=True)
@ -77,6 +82,7 @@ class AmrWind(CMakePackage, CudaPackage, ROCmPackage):
variant( variant(
"waves2amr", default=False, description="Enable Waves2AMR support for ocean wave input" "waves2amr", default=False, description="Enable Waves2AMR support for ocean wave input"
) )
variant("fft", default=False, description="Enable FFT support for MAC projection")
depends_on("mpi", when="+mpi") depends_on("mpi", when="+mpi")
depends_on("hdf5~mpi", when="+hdf5~mpi") depends_on("hdf5~mpi", when="+hdf5~mpi")
@ -102,6 +108,7 @@ class AmrWind(CMakePackage, CudaPackage, ROCmPackage):
depends_on("helics@:3.3.2", when="+helics") depends_on("helics@:3.3.2", when="+helics")
depends_on("helics@:3.3.2+mpi", when="+helics+mpi") depends_on("helics@:3.3.2+mpi", when="+helics+mpi")
depends_on("fftw", when="@2.1: +waves2amr") depends_on("fftw", when="@2.1: +waves2amr")
depends_on("fftw", when="@3.3.1: +fft")
for arch in CudaPackage.cuda_arch_values: for arch in CudaPackage.cuda_arch_values:
depends_on("hypre+cuda cuda_arch=%s" % arch, when="+cuda+hypre cuda_arch=%s" % arch) depends_on("hypre+cuda cuda_arch=%s" % arch, when="+cuda+hypre cuda_arch=%s" % arch)
@ -137,6 +144,10 @@ def cmake_args(self):
"rocm", "rocm",
"tests", "tests",
"tiny_profile", "tiny_profile",
"fft",
"helics",
"umpire",
"sycl",
] ]
args = [self.define_from_variant("AMR_WIND_ENABLE_%s" % v.upper(), v) for v in vs] args = [self.define_from_variant("AMR_WIND_ENABLE_%s" % v.upper(), v) for v in vs]
@ -161,19 +172,19 @@ def cmake_args(self):
args.append("-DAMReX_AMD_ARCH=" + ";".join(str(x) for x in targets)) args.append("-DAMReX_AMD_ARCH=" + ";".join(str(x) for x in targets))
if spec.satisfies("+umpire"): if spec.satisfies("+umpire"):
args.append(self.define_from_variant("AMR_WIND_ENABLE_UMPIRE", "umpire"))
args.append(define("UMPIRE_DIR", spec["umpire"].prefix)) args.append(define("UMPIRE_DIR", spec["umpire"].prefix))
if spec.satisfies("+helics"): if spec.satisfies("+helics"):
args.append(self.define_from_variant("AMR_WIND_ENABLE_HELICS", "helics"))
args.append(define("HELICS_DIR", spec["helics"].prefix)) args.append(define("HELICS_DIR", spec["helics"].prefix))
if spec.satisfies("+waves2amr"): if spec.satisfies("+waves2amr"):
args.append(self.define_from_variant("AMR_WIND_ENABLE_W2A", "waves2amr")) args.append(self.define_from_variant("AMR_WIND_ENABLE_W2A", "waves2amr"))
args.append(define("FFTW_DIR", spec["fftw"].prefix)) args.append(define("FFTW_DIR", spec["fftw"].prefix))
if spec.satisfies("+fft"):
args.append(define("FFTW_DIR", spec["fftw"].prefix))
if spec.satisfies("+sycl"): if spec.satisfies("+sycl"):
args.append(define("AMR_WIND_ENABLE_SYCL", True))
requires( requires(
"%dpcpp", "%dpcpp",
"%oneapi", "%oneapi",