Skip to content

Commit

Permalink
Merge pull request #304 from climbfuji/feature/version_updates_20230817
Browse files Browse the repository at this point in the history
Various version updates for spack-stack-1.5.0 (met, metplus, eckit, fckit, fiat, ecmwf-atlas)
  • Loading branch information
climbfuji authored Aug 23, 2023
2 parents 4df5f8c + a3bd118 commit 06cf447
Show file tree
Hide file tree
Showing 10 changed files with 232 additions and 153 deletions.
1 change: 1 addition & 0 deletions var/spack/repos/builtin/packages/eckit/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class Eckit(CMakePackage):

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")
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
21 changes: 13 additions & 8 deletions var/spack/repos/builtin/packages/ecmwf-atlas/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,26 @@ class EcmwfAtlas(CMakePackage):

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")
depends_on("boost cxxstd=14 visibility=hidden", when="@0.26.0:", type=("build", "run"))
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)
depends_on("fckit", when="+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.patch", when="%intel")
patch("intel_vectorization_v0p33.patch", when="@:0.33 %intel")
patch("intel_vectorization_v0p34.patch", when="@0.34: %intel")

variant(
"build_type",
Expand All @@ -43,7 +48,7 @@ class EcmwfAtlas(CMakePackage):
values=("Debug", "Release", "RelWithDebInfo"),
)

variant('openmp', default=True, description='Use OpenMP?')
variant("openmp", default=True, description="Use OpenMP?")
depends_on("llvm-openmp", when="+openmp %apple-clang", type=("build", "run"))
variant("shared", default=True)

Expand All @@ -61,7 +66,7 @@ class EcmwfAtlas(CMakePackage):

def cmake_args(self):
args = [
self.define_from_variant('ENABLE_OMP', 'openmp'),
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"),
Expand All @@ -74,8 +79,8 @@ def cmake_args(self):

@when("+fismahigh")
def patch(self):
filter_file("http://www\.ecmwf\.int", "", "cmake/atlas-import.cmake.in")
filter_file("int\.ecmwf", "", "cmake/atlas-import.cmake.in")
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:
Expand Down
78 changes: 47 additions & 31 deletions var/spack/repos/builtin/packages/fckit/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import glob
import os

from spack import *
from spack.package import *


class Fckit(CMakePackage):
Expand All @@ -16,54 +16,70 @@ class Fckit(CMakePackage):
git = "https://github.com/ecmwf/fckit.git"
url = "https://github.com/ecmwf/fckit/archive/0.9.0.tar.gz"

maintainers('climbfuji')
maintainers("climbfuji")

version('master', branch='master')
version('develop', branch='develop')
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'))
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(
"build_type",
default="RelWithDebInfo",
description="CMake build type",
values=("Debug", "Release", "RelWithDebInfo"),
)

variant('eckit', default=True)
depends_on('eckit+mpi', when='+eckit')
variant("eckit", default=True)
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?')
variant("openmp", default=True, description="Use OpenMP?")
depends_on("llvm-openmp", when="+openmp %apple-clang", type=("build", "run"))
variant('shared', default=True)
variant("shared", default=True)
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"))
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'
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'))
if "~shared" in self.spec:
args.append("-DBUILD_SHARED_LIBS=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++'
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))
args.append("-DECBUILD_CXX_IMPLICIT_LINK_LIBRARIES={}".format(cxxlib))

return args

Expand Down
42 changes: 42 additions & 0 deletions var/spack/repos/builtin/packages/fiat/intel_warnings_v120.patch
Original file line number Diff line number Diff line change
@@ -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 )
4 changes: 3 additions & 1 deletion var/spack/repos/builtin/packages/fiat/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class Fiat(CMakePackage):
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")

Expand All @@ -39,7 +40,8 @@ class Fiat(CMakePackage):
depends_on("eckit", when="+fckit")
depends_on("fckit", when="+fckit")

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

def cmake_args(self):
args = [
Expand Down
Loading

0 comments on commit 06cf447

Please sign in to comment.