Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add UM version to fiat, using the ACCESS-NRI/fiat repo and CMake environment variables #3

Draft
wants to merge 6 commits into
base: releases/v0.22
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions var/spack/repos/builtin/packages/bison/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class Bison(AutotoolsPackage, GNUMirrorPackage):

depends_on("gettext", when="+color")
depends_on("[email protected]:", type=("build", "run"))
depends_on("diffutils", type="build")

patch("pgi.patch", when="@3.0.4")
# The NVIDIA compilers do not currently support some GNU builtins.
Expand Down
16 changes: 12 additions & 4 deletions var/spack/repos/builtin/packages/fiat/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ class Fiat(CMakePackage):
Fortran utility libraries, extracted from the IFS/Arpege model."""

homepage = "https://github.com/ecmwf-ifs/fiat"
git = "https://github.com/ecmwf-ifs/fiat.git"
git = "https://github.com/ACCESS-NRI/fiat.git"
url = "https://github.com/ecmwf-ifs/fiat/archive/1.0.0.tar.gz"

maintainers("climbfuji")
maintainers("climbfuji", "penguian")

license("Apache-2.0")

version("main", branch="main", no_cache=True)
version("um", branch="um", no_cache=True)
version("1.2.0", sha256="758147410a4a3c493290b87443b4091660b915fcf29f7c4d565c5168ac67745f")
version("1.1.0", sha256="58354e60d29a1b710bfcea9b87a72c0d89c39182cb2c9523ead76a142c695f82")
version("1.0.0", sha256="45afe86117142831fdd61771cf59f31131f2b97f52a2bd04ac5eae9b2ab746b8")
Expand All @@ -39,7 +40,7 @@ class Fiat(CMakePackage):
depends_on("eckit", when="+fckit")
depends_on("fckit", when="+fckit")

patch("intel_warnings_v110.patch", when="@:1.1.0")
patch("intel_warnings_v110.patch", when="@0:1.1.0")
patch("intel_warnings_v120.patch", when="@1.2.0:")

def cmake_args(self):
Expand All @@ -48,5 +49,12 @@ def cmake_args(self):
self.define_from_variant("ENABLE_MPI", "mpi"),
self.define_from_variant("ENABLE_FCKIT", "fckit"),
]

if "+mpi" in self.spec:
args.extend(
[
self.define("CMAKE_C_COMPILER", self.spec["mpi"].mpicc),
self.define("CMAKE_CXX_COMPILER", self.spec["mpi"].mpicxx),
self.define("CMAKE_Fortran_COMPILER", self.spec["mpi"].mpifc),
]
)
return args
4 changes: 4 additions & 0 deletions var/spack/repos/builtin/packages/fms/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,8 @@ def cmake_args(self):
self.define_from_variant("USE_DEPRECATED_IO", "deprecated_io"),
]

args.append(self.define("CMAKE_C_COMPILER", self.spec["mpi"].mpicc))
args.append(self.define("CMAKE_CXX_COMPILER", self.spec["mpi"].mpicxx))
args.append(self.define("CMAKE_Fortran_COMPILER", self.spec["mpi"].mpifc))

return args
17 changes: 17 additions & 0 deletions var/spack/repos/builtin/packages/openmpi/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -1174,6 +1174,23 @@ def configure_args(self):
# if spec.satisfies("@5.0.0:") and spec.satisfies("%oneapi"):
# config_args.append("--disable-io-romio")

# https://www.intel.com/content/www/us/en/developer/articles/release-notes/oneapi-c-compiler-release-notes.html :
# Key Features in Intel C++ Compiler Classic 2021.7
#
# The Intel C++ Classic Compiler is deprecated and an additional
# diagnostic message will be output with each invocation. This
# diagnostic may impact expected output during compilation. For
# example, using the compiler to produce preprocessed information
# (icpc -E) will produce the additional deprecation diagnostic,
# interfering with the expected preprocessed output.
#
# This output can be disabled by using -diag-disable=10441 on
# Linux/macOS or /Qdiag-disable:10441 on Windows. You can add this
# option on the command line, configuration file or option setting
# environment variables.
if spec.satisfies("%[email protected]:"):
config_args.append("CPPFLAGS=-diag-disable=10441")

return config_args

@run_after("install", when="+wrapper-rpath")
Expand Down