Bug fixes for fckit (disable finalization of DDTs) and ectrans (disable use of Fortran contiguous keyword) (#49111)

* 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
This commit is contained in:
Dom Heinzeller 2025-02-19 20:03:05 -07:00 committed by GitHub
parent 2554c7bd21
commit adbb41c7df
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 16 deletions

View File

@ -74,5 +74,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

View File

@ -50,17 +50,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 = [
@ -72,11 +61,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")