Skip to content

Commit

Permalink
release/1.9.0: bug fixes for fckit (disable finalization of DDTs) and…
Browse files Browse the repository at this point in the history
… ectrans (disable use of Fortran contiguous keyword) (#518)

* In var/spack/repos/builtin/packages/ectrans/package.py, always set cmake argument ECTRANS_HAVE_CONTIGUOUS_ISSUE to turn off problematic use of Fortran 'contiguous' keyword

* In var/spack/repos/builtin/packages/ectrans/package.py, always set cmake argument ENABLE_FINAL=OFF to turn off problematic finalization of derived data types

* Update links to issues in fckit and ectrans

* Fix wrong cmake argument for ECTRANS_HAVE_CONTIGUOUS_ISSUE in var/spack/repos/builtin/packages/ectrans/package.py
  • Loading branch information
climbfuji authored Feb 19, 2025
1 parent 85a566d commit 1c5e0ad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
5 changes: 5 additions & 0 deletions var/spack/repos/builtin/packages/ectrans/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,10 @@ def cmake_args(self):
self.define_from_variant("ENABLE_FFTW", "fftw"),
self.define_from_variant("ENABLE_MKL", "mkl"),
self.define_from_variant("ENABLE_TRANSI", "transi"),
# Turn off use of contiguous keyword in Fortran because a number
# of compilers have issues with it, and the hardcoded list of "bad"
# compilers in ectrans is incomplete and isn't kept up to date
# https://github.com/JCSDA/spack-stack/issues/1522
"-DECTRANS_HAVE_CONTIGUOUS_ISSUE=ON",
]
return args
21 changes: 5 additions & 16 deletions var/spack/repos/builtin/packages/fckit/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,6 @@ class Fckit(CMakePackage):
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 = [
Expand All @@ -73,11 +62,11 @@ def cmake_args(self):
if self.spec.satisfies("~shared"):
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")
# Turn off finalization of derived data types (DDTs) because it is
# flaky and we can't rely on fckit to auto-detect if the compiler
# supports the feature or not.
# https://github.com/JCSDA/spack-stack/issues/1521
args.append("-DENABLE_FINAL=OFF")

if (
self.spec.satisfies("%intel")
Expand Down

0 comments on commit 1c5e0ad

Please sign in to comment.