summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/ecbuild/package.py16
-rw-r--r--var/spack/repos/builtin/packages/eckit/package.py43
-rw-r--r--var/spack/repos/builtin/packages/ecmwf-atlas/clang_include_array.patch11
-rw-r--r--var/spack/repos/builtin/packages/ecmwf-atlas/intel_vectorization_v0p33.patch8
-rw-r--r--var/spack/repos/builtin/packages/ecmwf-atlas/intel_vectorization_v0p34.patch11
-rw-r--r--var/spack/repos/builtin/packages/ecmwf-atlas/package.py86
-rw-r--r--var/spack/repos/builtin/packages/ectrans/package.py65
-rw-r--r--var/spack/repos/builtin/packages/fckit/package.py91
-rw-r--r--var/spack/repos/builtin/packages/fiat/intel_warnings_v110.patch39
-rw-r--r--var/spack/repos/builtin/packages/fiat/intel_warnings_v120.patch42
-rw-r--r--var/spack/repos/builtin/packages/fiat/package.py50
11 files changed, 458 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/ecbuild/package.py b/var/spack/repos/builtin/packages/ecbuild/package.py
index a4a6656bed..66664ea6e3 100644
--- a/var/spack/repos/builtin/packages/ecbuild/package.py
+++ b/var/spack/repos/builtin/packages/ecbuild/package.py
@@ -13,8 +13,9 @@ class Ecbuild(CMakePackage):
homepage = "https://github.com/ecmwf/ecbuild"
url = "https://github.com/ecmwf/ecbuild/archive/refs/tags/3.6.1.tar.gz"
- maintainers("skosukhin")
+ maintainers("skosukhin", "climbfuji")
+ version("3.7.2", sha256="7a2d192cef1e53dc5431a688b2e316251b017d25808190faed485903594a3fb9")
version("3.6.5", sha256="98bff3d3c269f973f4bfbe29b4de834cd1d43f15b1c8d1941ee2bfe15e3d4f7f")
version("3.6.1", sha256="796ccceeb7af01938c2f74eab0724b228e9bf1978e32484aa3e227510f69ac59")
@@ -25,3 +26,16 @@ class Ecbuild(CMakePackage):
# Some of the installed scripts require running Perl:
depends_on("perl", type=("build", "run"))
+
+ variant("fismahigh", default=False, description="Apply patching for FISMA-high compliance")
+
+ @when("+fismahigh")
+ def patch(self):
+ filter_file('ssh://[^"]+', "", "cmake/compat/ecmwf_git.cmake")
+ filter_file('https?://[^"]+', "", "cmake/compat/ecmwf_git.cmake")
+ filter_file(
+ "https?://.*test-data", "DISABLED_BY_DEFAULT", "cmake/ecbuild_check_urls.cmake"
+ )
+ filter_file(
+ "https?://.*test-data", "DISABLED_BY_DEFAULT", "cmake/ecbuild_get_test_data.cmake"
+ )
diff --git a/var/spack/repos/builtin/packages/eckit/package.py b/var/spack/repos/builtin/packages/eckit/package.py
index 27b304d813..89e0d829ef 100644
--- a/var/spack/repos/builtin/packages/eckit/package.py
+++ b/var/spack/repos/builtin/packages/eckit/package.py
@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import os
+
from spack.package import *
@@ -11,17 +13,30 @@ class Eckit(CMakePackage):
and applications at ECMWF."""
homepage = "https://github.com/ecmwf/eckit"
+ git = "https://github.com/ecmwf/eckit.git"
url = "https://github.com/ecmwf/eckit/archive/refs/tags/1.16.0.tar.gz"
- maintainers("skosukhin")
+ maintainers("skosukhin", "climbfuji")
+ version("1.24.4", sha256="b6129eb4f7b8532aa6905033e4cf7d09aadc8547c225780fea3db196e34e4671")
+ version("1.23.1", sha256="cd3c4b7a3a2de0f4a59f00f7bab3178dd59c0e27900d48eaeb357975e8ce2f15")
+ version("1.23.0", sha256="3cac55ddf7036ecd32cb0974a1ec3a2d347de574ab3a2c0bb6c6f8982e5a7a09")
+ version("1.22.1", sha256="a3463d07e47e3bd3e5efa13fdc03d7d3a30ada919ccec3259c6c9c7da4cfdfd9")
version("1.20.2", sha256="9c11ddaaf346e40d11312b81ca7f1b510017f26618f4c0f5c5c59c37623fbac8")
version("1.19.0", sha256="a5fef36b4058f2f0aac8daf5bcc9740565f68da7357ddd242de3a5eed4765cc7")
version("1.16.3", sha256="d2aae7d8030e2ce39e5d04e36dd6aa739f3c8dfffe32c61c2a3127c36b573485")
version("1.16.0", sha256="9e09161ea6955df693d3c9ac70131985eaf7cf24a9fa4d6263661c6814ebbaf1")
+ variant(
+ "build_type",
+ default="RelWithDebInfo",
+ description="CMake build type",
+ values=("Debug", "Release", "RelWithDebInfo"),
+ )
+
variant("tools", default=True, description="Build the command line tools")
variant("mpi", default=True, description="Enable MPI support")
+ variant("openmp", default=True, description="Enable OpenMP support")
variant("admin", default=True, description="Build utilities for administration tools")
variant("sql", default=True, description="Build SQL engine")
variant(
@@ -44,11 +59,15 @@ class Eckit(CMakePackage):
description="Enable support for Unicode characters in Yaml/JSON" "parsers",
)
variant("aio", default=True, description="Enable asynchronous IO")
+ variant("fismahigh", default=False, description="Apply patching for FISMA-high compliance")
- depends_on("cmake@3.12:", type="build")
- depends_on("ecbuild@3.5:", type="build")
+ # Build issues with cmake 3.20, not sure about 3.21
+ depends_on("cmake@3.12:3.19,3.22:", type="build")
+ depends_on("ecbuild@3.5:", when="@:1.20.99", type="build")
+ depends_on("ecbuild@3.7:", when="@1.21:", type="build")
depends_on("mpi", when="+mpi")
+ depends_on("llvm-openmp", when="+openmp %apple-clang", type=("build", "run"))
depends_on("yacc", type="build", when="+admin")
depends_on("flex", type="build", when="+admin")
@@ -100,6 +119,7 @@ class Eckit(CMakePackage):
# currently prefer to avoid since ecBuild does the job in all known
# cases.
self.define_from_variant("ENABLE_MPI", "mpi"),
+ self.define_from_variant("ENABLE_OMP", "openmp"),
self.define_from_variant("ENABLE_ECKIT_CMD", "admin"),
self.define_from_variant("ENABLE_ECKIT_SQL", "sql"),
self.define("ENABLE_EIGEN", "linalg=eigen" in self.spec),
@@ -135,6 +155,10 @@ class Eckit(CMakePackage):
self.define("ENABLE_SANDBOX", False),
]
+ # Static build of eckit not working, many places in eckit's build
+ # system have SHARED hardcoded (in several CMakeLists.txt files).
+ args.append("-DBUILD_SHARED_LIBS=ON")
+
if "linalg=mkl" not in self.spec:
# ENABLE_LAPACK is ignored if MKL backend is enabled
# (the LAPACK backend is still built though):
@@ -150,6 +174,14 @@ class Eckit(CMakePackage):
return args
+ def setup_build_environment(self, env):
+ # Bug fix for macOS - cmake's find_package doesn't add "libtinfo.dylib" to the
+ # ncurses libraries, but the ncurses pkgconfig explicitly sets it. We need to
+ # add the correct spec['ncurses'].libs.ld_flags to LDFLAGS to compile eckit
+ # when the admin variant is enabled.
+ if self.spec.satisfies("platform=darwin") and self.spec.satisfies("+admin"):
+ env.append_flags("LDFLAGS", self.spec["ncurses"].libs.ld_flags)
+
def check(self):
ctest_args = ["-j", str(make_jobs)]
@@ -168,3 +200,8 @@ class Eckit(CMakePackage):
@property
def _enable_experimental(self):
return "linalg=armadillo" in self.spec
+
+ @when("+fismahigh")
+ def patch(self):
+ if os.path.exists(".travis.yml"):
+ os.remove(".travis.yml")
diff --git a/var/spack/repos/builtin/packages/ecmwf-atlas/clang_include_array.patch b/var/spack/repos/builtin/packages/ecmwf-atlas/clang_include_array.patch
new file mode 100644
index 0000000000..a9a5ac7eee
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ecmwf-atlas/clang_include_array.patch
@@ -0,0 +1,11 @@
+--- a/src/atlas/grid/detail/partitioner/CubedSpherePartitioner.h 2022-01-12 08:44:07.000000000 -0700
++++ b/src/atlas/grid/detail/partitioner/CubedSpherePartitioner.h 2022-01-12 08:44:11.000000000 -0700
+@@ -11,7 +11,7 @@
+ #pragma once
+
+ #include <vector>
+-
++#include <array>
+ #include "atlas/grid/detail/partitioner/Partitioner.h"
+
+ namespace atlas {
diff --git a/var/spack/repos/builtin/packages/ecmwf-atlas/intel_vectorization_v0p33.patch b/var/spack/repos/builtin/packages/ecmwf-atlas/intel_vectorization_v0p33.patch
new file mode 100644
index 0000000000..b7d9499cf8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ecmwf-atlas/intel_vectorization_v0p33.patch
@@ -0,0 +1,8 @@
+--- a/cmake/atlas_compile_flags.cmake
++++ b/cmake/atlas_compile_flags.cmake
+@@ -20,3 +20,5 @@ if( CMAKE_CXX_COMPILER_ID MATCHES Cray )
+ # directives, ACC directives, or ASM intrinsics.
+
+ endif()
++
++ecbuild_add_cxx_flags("-fp-speculation=safe")
diff --git a/var/spack/repos/builtin/packages/ecmwf-atlas/intel_vectorization_v0p34.patch b/var/spack/repos/builtin/packages/ecmwf-atlas/intel_vectorization_v0p34.patch
new file mode 100644
index 0000000000..6a4dc7cb80
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ecmwf-atlas/intel_vectorization_v0p34.patch
@@ -0,0 +1,11 @@
+--- a/cmake/atlas_compile_flags.cmake 2023-07-10 04:13:02.000000000 -0600
++++ b/cmake/atlas_compile_flags.cmake 2023-08-21 14:29:10.000000000 -0600
+@@ -21,6 +21,8 @@
+
+ endif()
+
++ecbuild_add_cxx_flags("-fp-speculation=safe")
++
+ if( CMAKE_CXX_COMPILER_ID MATCHES NVHPC )
+ ecbuild_add_cxx_flags("--diag_suppress declared_but_not_referenced --display_error_number" NAME atlas_cxx_disable_warnings )
+ # For all the variables with side effects (constructor/dectructor functionality)
diff --git a/var/spack/repos/builtin/packages/ecmwf-atlas/package.py b/var/spack/repos/builtin/packages/ecmwf-atlas/package.py
new file mode 100644
index 0000000000..00fce1ec78
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ecmwf-atlas/package.py
@@ -0,0 +1,86 @@
+# Copyright 2013-2022 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)
+
+import glob
+import os
+
+from spack.package import *
+
+
+class EcmwfAtlas(CMakePackage):
+ """A library for numerical weather prediction and climate modelling."""
+
+ homepage = "https://software.ecmwf.int/wiki/display/atlas"
+ git = "https://github.com/ecmwf/atlas.git"
+ url = "https://github.com/ecmwf/atlas/archive/0.22.1.tar.gz"
+
+ maintainers("climbfuji", "srherbener")
+
+ version("master", branch="master")
+ version("develop", branch="develop")
+ version("0.34.0", sha256="48536742cec0bc268695240843ac0e232e2b5142d06b19365688d9ea44dbd9ba")
+ version("0.33.0", sha256="a91fffe9cecb51c6ee8549cbc20f8279e7b1f67dd90448e6c04c1889281b0600")
+ version("0.32.1", sha256="3d1a46cb7f50e1a6ae9e7627c158760e132cc9f568152358e5f78460f1aaf01b")
+ version("0.31.1", sha256="fa9274c74c40c2115b9c6120a7040e357b0c7f37b20b601b684d2a83a479cdfb")
+ version("0.31.0", sha256="fa4ff8665544b8e19f79d171c540a9ca8bfc4127f52a3c4d4d618a2fe23354d7")
+
+ depends_on("ecbuild", type=("build"))
+ depends_on("eckit@:1.23", when="@:0.33")
+ depends_on("eckit@1.24:", when="@0.34:")
+ depends_on("boost cxxstd=14 visibility=hidden", when="@0.26.0:0.33.99", type=("build", "run"))
+ depends_on("boost cxxstd=17 visibility=hidden", when="@0.34.0:", type=("build", "run"))
+ variant("fckit", default=True, description="Enable fckit")
+ depends_on("fckit@:0.10", when="@:0.33 +fckit")
+ depends_on("fckit@0.11:", when="@0.34: +fckit")
+ depends_on("python")
+
+ patch("clang_include_array.patch", when="%apple-clang")
+ patch("clang_include_array.patch", when="%clang")
+ patch("intel_vectorization_v0p33.patch", when="@:0.33 %intel")
+ patch("intel_vectorization_v0p34.patch", when="@0.34: %intel")
+
+ variant(
+ "build_type",
+ default="RelWithDebInfo",
+ description="CMake build type",
+ values=("Debug", "Release", "RelWithDebInfo"),
+ )
+
+ variant("openmp", default=True, description="Use OpenMP")
+ depends_on("llvm-openmp", when="+openmp %apple-clang", type=("build", "run"))
+ variant("shared", default=True, description="Build shared libraries")
+
+ variant("trans", default=False, description="Enable trans")
+ depends_on("ectrans@1.1.0:", when="@0.31.0: +trans")
+ variant("eigen", default=True, description="Enable eigen")
+ depends_on("eigen", when="+eigen")
+ variant("fftw", default=True, description="Enable fftw")
+ depends_on("fftw-api", when="+fftw")
+
+ variant("fismahigh", default=False, description="Apply patching for FISMA-high compliance")
+
+ def cmake_args(self):
+ args = [
+ self.define_from_variant("ENABLE_OMP", "openmp"),
+ self.define_from_variant("ENABLE_FCKIT", "fckit"),
+ self.define_from_variant("ENABLE_TRANS", "trans"),
+ self.define_from_variant("ENABLE_EIGEN", "eigen"),
+ self.define_from_variant("ENABLE_FFTW", "fftw"),
+ "-DPYTHON_EXECUTABLE:FILEPATH=" + self.spec["python"].command.path,
+ ]
+ if "~shared" in self.spec:
+ args.append("-DBUILD_SHARED_LIBS=OFF")
+ return args
+
+ @when("+fismahigh")
+ def patch(self):
+ filter_file("http://www\.ecmwf\.int", "", "cmake/atlas-import.cmake.in") # noqa: W605
+ filter_file("int\.ecmwf", "", "cmake/atlas-import.cmake.in") # noqa: W605
+ filter_file('http[^"]+', "", "cmake/atlas_export.cmake")
+ patterns = [".travis.yml", "tools/install*.sh", "tools/github-sha.sh"]
+ for pattern in patterns:
+ paths = glob.glob(pattern)
+ for path in paths:
+ os.remove(path)
diff --git a/var/spack/repos/builtin/packages/ectrans/package.py b/var/spack/repos/builtin/packages/ectrans/package.py
new file mode 100644
index 0000000000..5bac4e53b4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ectrans/package.py
@@ -0,0 +1,65 @@
+# Copyright 2013-2023 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 *
+
+
+class Ectrans(CMakePackage):
+ """Ectrans is the global spherical Harmonics transforms library,
+ extracted from the IFS. It is using a hybrid of MPI and OpenMP
+ parallelisation strategies. The package contains both single- and double precision
+ Fortran libraries (trans_sp, trans_dp), as well as a
+ C interface to the double-precision version (transi_dp)."""
+
+ homepage = "https://github.com/ecmwf-ifs/ectrans"
+ git = "https://github.com/ecmwf-ifs/ectrans.git"
+ url = "https://github.com/ecmwf-ifs/ectrans/archive/1.1.0.tar.gz"
+
+ maintainers("climbfuji")
+
+ version("develop", branch="develop", no_cache=True)
+ version("main", branch="main", no_cache=True)
+ version("1.2.0", sha256="2ee6dccc8bbfcc23faada1d957d141f24e41bb077c1821a7bc2b812148dd336c")
+ version("1.1.0", sha256="3c9848bb65033fbe6d791084ee347b3adf71d5dfe6d3c11385000017b6469a3e")
+
+ variant(
+ "build_type",
+ default="RelWithDebInfo",
+ description="CMake build type",
+ values=("Debug", "Release", "RelWithDebInfo"),
+ )
+
+ variant("mpi", default=True, description="Use MPI")
+ variant("openmp", default=True, description="Use OpenMP")
+
+ variant("double_precision", default=True, description="Support for double precision")
+ variant("single_precision", default=True, description="Support for single precision")
+
+ variant("mkl", default=False, description="Use MKL")
+ variant("fftw", default=True, description="Use FFTW")
+
+ variant("transi", default=True, description="Compile TransI C-interface to trans")
+
+ depends_on("ecbuild", type="build")
+ depends_on("mpi", when="+mpi")
+ depends_on("blas")
+ depends_on("lapack")
+ depends_on("fftw-api", when="+fftw")
+ depends_on("mkl", when="+mkl")
+
+ depends_on("fiat~mpi", when="~mpi")
+ depends_on("fiat+mpi", when="+mpi")
+
+ def cmake_args(self):
+ args = [
+ self.define_from_variant("ENABLE_MPI", "mpi"),
+ self.define_from_variant("ENABLE_OMP", "openmp"),
+ self.define_from_variant("ENABLE_DOUBLE_PRECISION", "double_precision"),
+ self.define_from_variant("ENABLE_SINGLE_PRECISION", "single_precision"),
+ self.define_from_variant("ENABLE_FFTW", "fftw"),
+ self.define_from_variant("ENABLE_MKL", "mkl"),
+ self.define_from_variant("ENABLE_TRANSI", "transi"),
+ ]
+ return args
diff --git a/var/spack/repos/builtin/packages/fckit/package.py b/var/spack/repos/builtin/packages/fckit/package.py
new file mode 100644
index 0000000000..de4f995f27
--- /dev/null
+++ b/var/spack/repos/builtin/packages/fckit/package.py
@@ -0,0 +1,91 @@
+# Copyright 2013-2023 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)
+
+import glob
+import os
+
+from spack.package import *
+
+
+class Fckit(CMakePackage):
+ """A Fortran toolkit for interoperating Fortran with C/C++."""
+
+ homepage = "https://software.ecmwf.int/wiki/display/fckit"
+ git = "https://github.com/ecmwf/fckit.git"
+ url = "https://github.com/ecmwf/fckit/archive/0.9.0.tar.gz"
+
+ maintainers("climbfuji")
+
+ version("master", branch="master")
+ version("develop", branch="develop")
+ version("0.11.0", sha256="846f5c369940c0a3d42cd12932f7d6155339e79218d149ebbfdd02e759dc86c5")
+ version("0.10.1", sha256="9cde04fefa50624bf89068ab793cc2e9437c0cd1c271a41af7d54dbd37c306be")
+ version("0.10.0", sha256="f16829f63a01cdef5e158ed2a51f6d4200b3fe6dce8f251af158141a1afe482b")
+ version("0.9.5", sha256="183cd78e66d3283d9e6e8e9888d3145f453690a4509fb701b28d1ac6757db5de")
+
+ depends_on("mpi")
+ depends_on("python")
+ depends_on("ecbuild", type=("build"))
+
+ variant(
+ "build_type",
+ default="RelWithDebInfo",
+ description="CMake build type",
+ values=("Debug", "Release", "RelWithDebInfo"),
+ )
+
+ variant("eckit", default=True, description="Enable eckit")
+ depends_on("eckit@:1.23 +mpi", when="@:0.10 +eckit")
+ depends_on("eckit@1.24: +mpi", when="@0.11: +eckit")
+
+ variant("openmp", default=True, description="Use OpenMP?")
+ depends_on("llvm-openmp", when="+openmp %apple-clang", type=("build", "run"))
+ variant("shared", default=True, description="Build shared libraries")
+ variant("fismahigh", default=False, description="Apply patching for FISMA-high compliance")
+ variant(
+ "finalize_ddts",
+ default="auto",
+ description="Enable / disable automatic finalization of derived types",
+ values=("auto", "no", "yes"),
+ )
+
+ # fckit fails to auto-detect/switch off finalization
+ # of derived types for latest Intel compilers. If set
+ # to auto, turn off in cmake_args. If set to yes, abort.
+ conflicts("%intel@2021.8:", when="finalize_ddts=yes")
+
+ def cmake_args(self):
+ args = [
+ self.define_from_variant("ENABLE_ECKIT", "eckit"),
+ self.define_from_variant("ENABLE_OMP", "openmp"),
+ "-DPYTHON_EXECUTABLE:FILEPATH=" + self.spec["python"].command.path,
+ "-DFYPP_NO_LINE_NUMBERING=ON",
+ ]
+
+ if "~shared" in self.spec:
+ args.append("-DBUILD_SHARED_LIBS=OFF")
+
+ if "finalize_ddts=auto" not in self.spec:
+ args.append(self.define_from_variant("ENABLE_FINAL", "finalize_ddts"))
+ elif "finalize_ddts=auto" in self.spec and self.spec.satisfies("%intel@2021.8:"):
+ # See comment above (conflicts for finalize_ddts)
+ args.append("-DENABLE_FINAL=OFF")
+
+ if self.spec.satisfies("%intel") or self.spec.satisfies("%gcc"):
+ cxxlib = "stdc++"
+ elif self.spec.satisfies("%clang") or self.spec.satisfies("%apple-clang"):
+ cxxlib = "c++"
+ else:
+ raise InstallError("C++ library not configured for compiler")
+ args.append("-DECBUILD_CXX_IMPLICIT_LINK_LIBRARIES={}".format(cxxlib))
+
+ return args
+
+ @when("+fismahigh")
+ def patch(self):
+ patterns = ["tools/install-*", "tools/github-sha*", ".travis.yml"]
+ for pattern in patterns:
+ for path in glob.glob(pattern):
+ os.remove(path)
diff --git a/var/spack/repos/builtin/packages/fiat/intel_warnings_v110.patch b/var/spack/repos/builtin/packages/fiat/intel_warnings_v110.patch
new file mode 100644
index 0000000000..fd2a08f41d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/fiat/intel_warnings_v110.patch
@@ -0,0 +1,39 @@
+--- a/cmake/fiat_compiler_warnings.cmake
++++ b/cmake/fiat_compiler_warnings.cmake
+@@ -5,12 +5,14 @@ if(HAVE_WARNINGS)
+ ecbuild_add_c_flags("-Wextra" NO_FAIL)
+ ecbuild_add_c_flags("-Wno-unused-parameter" NO_FAIL)
+ ecbuild_add_c_flags("-Wno-unused-variable" NO_FAIL)
+- ecbuild_add_c_flags("-Wno-gnu-zero-variadic-macro-arguments" NO_FAIL)
++ if (CMAKE_C_COMPILER_ID MATCHES "Clang|GNU")
++ ecbuild_add_c_flags("-Wno-gnu-zero-variadic-macro-arguments" NO_FAIL)
++ endif()
+ endif()
+
+ # Always disable some warnings
+ ecbuild_add_c_flags("-Wno-deprecated-declarations" NO_FAIL)
+-if( CMAKE_C_COMPILER_ID MATCHES Intel )
+- ecbuild_add_c_flags("-diag-disable=279") # controlling expression is constant
+- ecbuild_add_c_flags("-diag-disable=11076") # inline limits
+-endif()
++#if( CMAKE_C_COMPILER_ID MATCHES Intel )
++# ecbuild_add_c_flags("-diag-disable=279") # controlling expression is constant
++# ecbuild_add_c_flags("-diag-disable=11076") # inline limits
++#endif()
+--- a/src/fiat/CMakeLists.txt
++++ b/src/fiat/CMakeLists.txt
+@@ -26,10 +26,10 @@ endif()
+
+ ### Compilation flags
+
+-if( CMAKE_Fortran_COMPILER_ID MATCHES "Intel" )
+- ## To disable checking of argument correctness of dummy mpi symbols
+- ecbuild_add_fortran_flags( -nowarn nointerfaces )
+-endif()
++#if( CMAKE_Fortran_COMPILER_ID MATCHES "Intel" )
++# ## To disable checking of argument correctness of dummy mpi symbols
++# ecbuild_add_fortran_flags( -nowarn nointerfaces )
++#endif()
+
+ if( CMAKE_Fortran_COMPILER_ID MATCHES "GNU" )
+ ecbuild_add_fortran_flags( -ffree-line-length-none )
diff --git a/var/spack/repos/builtin/packages/fiat/intel_warnings_v120.patch b/var/spack/repos/builtin/packages/fiat/intel_warnings_v120.patch
new file mode 100644
index 0000000000..a1b2c5389e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/fiat/intel_warnings_v120.patch
@@ -0,0 +1,42 @@
+--- a/cmake/fiat_compiler_warnings.cmake 2023-08-21 08:29:06.000000000 -0600
++++ b/cmake/fiat_compiler_warnings.cmake 2023-08-21 08:37:40.000000000 -0600
+@@ -5,15 +5,17 @@
+ ecbuild_add_c_flags("-Wextra" NO_FAIL)
+ ecbuild_add_c_flags("-Wno-unused-parameter" NO_FAIL)
+ ecbuild_add_c_flags("-Wno-unused-variable" NO_FAIL)
+- ecbuild_add_c_flags("-Wno-gnu-zero-variadic-macro-arguments" NO_FAIL)
++ if (CMAKE_C_COMPILER_ID MATCHES "Clang|GNU")
++ ecbuild_add_c_flags("-Wno-gnu-zero-variadic-macro-arguments" NO_FAIL)
++ endif()
+ endif()
+
+ # Always disable some warnings
+ ecbuild_add_c_flags("-Wno-deprecated-declarations" NO_FAIL)
+-if( CMAKE_C_COMPILER_ID MATCHES Intel )
+- ecbuild_add_c_flags("-diag-disable=279") # controlling expression is constant
+- ecbuild_add_c_flags("-diag-disable=11076") # inline limits
+-endif()
++#if( CMAKE_C_COMPILER_ID MATCHES Intel )
++# ecbuild_add_c_flags("-diag-disable=279") # controlling expression is constant
++# ecbuild_add_c_flags("-diag-disable=11076") # inline limits
++#endif()
+ if( CMAKE_Fortran_COMPILER_ID MATCHES Cray )
+ ecbuild_add_fortran_flags("-hnomessage=878") # A module named ... has already been directly or indirectly use associated into this scope
+ ecbuild_add_fortran_flags("-hnomessage=867") # Module ... has no public objects declared in the module, therefore nothing can be use associated from the module.
+--- a/src/fiat/CMakeLists.txt
++++ b/src/fiat/CMakeLists.txt
+@@ -26,10 +26,10 @@ endif()
+
+ ### Compilation flags
+
+-if( CMAKE_Fortran_COMPILER_ID MATCHES "Intel" )
+- ## To disable checking of argument correctness of dummy mpi symbols
+- ecbuild_add_fortran_flags( -nowarn nointerfaces )
+-endif()
++#if( CMAKE_Fortran_COMPILER_ID MATCHES "Intel" )
++# ## To disable checking of argument correctness of dummy mpi symbols
++# ecbuild_add_fortran_flags( -nowarn nointerfaces )
++#endif()
+
+ if( CMAKE_Fortran_COMPILER_ID MATCHES "GNU" )
+ ecbuild_add_fortran_flags( -ffree-line-length-none )
diff --git a/var/spack/repos/builtin/packages/fiat/package.py b/var/spack/repos/builtin/packages/fiat/package.py
new file mode 100644
index 0000000000..a839b0e8a6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/fiat/package.py
@@ -0,0 +1,50 @@
+# Copyright 2013-2023 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 *
+
+
+class Fiat(CMakePackage):
+ """FIAT (Fortran IFS and Arpege Toolkit) is a collection of selected
+ Fortran utility libraries, extracted from the IFS/Arpege model."""
+
+ homepage = "https://github.com/ecmwf-ifs/fiat"
+ git = "https://github.com/ecmwf-ifs/fiat.git"
+ url = "https://github.com/ecmwf-ifs/fiat/archive/1.0.0.tar.gz"
+
+ maintainers("climbfuji")
+
+ version("main", branch="main", no_cache=True)
+ version("1.2.0", sha256="758147410a4a3c493290b87443b4091660b915fcf29f7c4d565c5168ac67745f")
+ version("1.1.0", sha256="58354e60d29a1b710bfcea9b87a72c0d89c39182cb2c9523ead76a142c695f82")
+ version("1.0.0", sha256="45afe86117142831fdd61771cf59f31131f2b97f52a2bd04ac5eae9b2ab746b8")
+
+ variant(
+ "build_type",
+ default="RelWithDebInfo",
+ description="CMake build type",
+ values=("Debug", "Release", "RelWithDebInfo"),
+ )
+
+ variant("mpi", default=True, description="Use MPI")
+ variant("openmp", default=True, description="Use OpenMP")
+ variant("fckit", default=True, description="Use fckit")
+
+ depends_on("ecbuild", type=("build"))
+ depends_on("mpi", when="+mpi")
+ depends_on("eckit", when="+fckit")
+ depends_on("fckit", when="+fckit")
+
+ patch("intel_warnings_v110.patch", when="@:1.1.0")
+ patch("intel_warnings_v120.patch", when="@1.2.0:")
+
+ def cmake_args(self):
+ args = [
+ self.define_from_variant("ENABLE_OMP", "openmp"),
+ self.define_from_variant("ENABLE_MPI", "mpi"),
+ self.define_from_variant("ENABLE_FCKIT", "fckit"),
+ ]
+
+ return args