summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAMD Toolchain Support <73240730+amd-toolchain-support@users.noreply.github.com>2024-06-12 07:15:08 +0530
committerGitHub <noreply@github.com>2024-06-11 18:45:08 -0700
commitfc2ee5cae85d17c21fbad4d04ee21ce7044ac74f (patch)
treeb865bc3977ac621d543466c19d7f3534e7457f4a
parente11f83f34b218721f8dc8b043c8e7d965e114df1 (diff)
downloadspack-fc2ee5cae85d17c21fbad4d04ee21ce7044ac74f.tar.gz
spack-fc2ee5cae85d17c21fbad4d04ee21ce7044ac74f.tar.bz2
spack-fc2ee5cae85d17c21fbad4d04ee21ce7044ac74f.tar.xz
spack-fc2ee5cae85d17c21fbad4d04ee21ce7044ac74f.zip
WRF 4.5.2 support is added for AOCC compilers (#44584)
Co-authored-by: Raviteja K <rkuppili@amd.com>
-rw-r--r--var/spack/repos/builtin/packages/wrf/package.py26
1 files changed, 20 insertions, 6 deletions
diff --git a/var/spack/repos/builtin/packages/wrf/package.py b/var/spack/repos/builtin/packages/wrf/package.py
index db4e6cac0e..f081b4e60b 100644
--- a/var/spack/repos/builtin/packages/wrf/package.py
+++ b/var/spack/repos/builtin/packages/wrf/package.py
@@ -71,6 +71,11 @@ class Wrf(Package):
tags = ["windows"]
version(
+ "4.5.2",
+ sha256="408ba6aa60d9cd51d6bad2fa075a3d37000eb581b5d124162885b049c892bbdc",
+ url="https://github.com/wrf-model/WRF/releases/download/v4.5.2/v4.5.2.tar.gz",
+ )
+ version(
"4.5.1",
sha256="9d557c34c105db4d41e727843ecb19199233c7cf82c5369b34a2ce8efe65e2d1",
url="https://github.com/wrf-model/WRF/releases/download/v4.5.1/v4.5.1.tar.gz",
@@ -159,13 +164,13 @@ class Wrf(Package):
patch("patches/4.0/tirpc_detect.patch", when="@4.0")
patch("patches/4.0/add_aarch64.patch", when="@4.0")
- patch("patches/4.2/arch.Config.pl.patch", when="@4.2:")
+ patch("patches/4.2/arch.Config.pl.patch", when="@4.2:4.5.1")
patch("patches/4.2/arch.configure.defaults.patch", when="@=4.2")
patch("patches/4.2/4.2.2_arch.configure.defaults.patch", when="@4.2.2")
patch("patches/4.2/arch.conf_tokens.patch", when="@4.2:")
patch("patches/4.2/arch.postamble.patch", when="@4.2")
patch("patches/4.2/configure.patch", when="@4.2:4.3.3")
- patch("patches/4.2/external.io_netcdf.makefile.patch", when="@4.2:")
+ patch("patches/4.2/external.io_netcdf.makefile.patch", when="@4.2:4.5.1")
patch("patches/4.2/var.gen_be.Makefile.patch", when="@4.2:")
patch("patches/4.2/Makefile.patch", when="@4.2")
patch("patches/4.2/tirpc_detect.patch", when="@4.2")
@@ -173,7 +178,7 @@ class Wrf(Package):
patch("patches/4.2/add_aarch64_acfl.patch", when="@4.2:4.3.1 %arm target=aarch64:")
patch("patches/4.2/configure_aocc_2.3.patch", when="@4.2 %aocc@:2.4.0")
patch("patches/4.2/configure_aocc_3.0.patch", when="@4.2 %aocc@3.0.0:3.2.0")
- patch("patches/4.2/hdf5_fix.patch", when="@4.2: %aocc")
+ patch("patches/4.2/hdf5_fix.patch", when="@4.2:4.5.1 %aocc")
patch("patches/4.2/derf_fix.patch", when="@=4.2 %aocc")
patch(
"patches/4.2/add_tools_flags_acfl2304.patch",
@@ -183,7 +188,7 @@ class Wrf(Package):
patch("patches/4.3/add_aarch64.patch", when="@4.3.2:4.4.2 %gcc target=aarch64:")
patch("patches/4.3/add_aarch64_acfl.patch", when="@4.3.2:4.4.2 %arm target=aarch64:")
- patch("patches/4.4/arch.postamble.patch", when="@4.4:")
+ patch("patches/4.4/arch.postamble.patch", when="@4.4:4.5.1")
patch("patches/4.4/configure.patch", when="@4.4:4.4.2")
patch("patches/4.4/ifx.patch", when="@4.4: %oneapi")
@@ -200,7 +205,7 @@ class Wrf(Package):
)
patch("patches/4.2/configure_fujitsu.patch", when="@4 %fj")
- patch("patches/4.3/Makefile.patch", when="@4.3:")
+ patch("patches/4.3/Makefile.patch", when="@4.3:4.5.1")
patch("patches/4.3/arch.postamble.patch", when="@4.3:4.3.3")
patch("patches/4.3/fujitsu.patch", when="@4.3: %fj")
# Syntax errors in physics routines
@@ -259,7 +264,13 @@ class Wrf(Package):
env.append_path("PATH", self.prefix.tools)
def setup_build_environment(self, env):
- env.set("NETCDF", self.spec["netcdf-c"].prefix)
+ # From 4.5.2 the split-netcdf patches are not needed,
+ # just tell the build system where netcdf and netcdf-c are:
+ if self.spec.satisfies("@4.5.2:"):
+ env.set("NETCDF", self.spec["netcdf-fortran"].prefix)
+ env.set("NETCDF_C", self.spec["netcdf-c"].prefix)
+ else:
+ env.set("NETCDF", self.spec["netcdf-c"].prefix)
if "+pnetcdf" in self.spec:
env.set("PNETCDF", self.spec["parallel-netcdf"].prefix)
# Add WRF-Chem module
@@ -381,6 +392,9 @@ class Wrf(Package):
config.filter("^DM_FC.*mpif90", "DM_FC = {0}".format(self.spec["mpi"].mpifc))
config.filter("^DM_CC.*mpicc", "DM_CC = {0}".format(self.spec["mpi"].mpicc))
+ if self.spec.satisfies("@:4.0.3 %intel@2018:"):
+ config.filter(r"-openmp", "-qopenmp")
+
@run_before("configure")
def fortran_check(self):
if not self.compiler.fc: