forked from spack/spack
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #457 from climbfuji/feature/update_odc_and_yafyaml…
…_for_gcc13 For gcc@13: Update GFE packages (yafyaml etc) from spack develop and add [email protected]
- Loading branch information
Showing
6 changed files
with
37 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ class Pfunit(CMakePackage): | |
|
||
maintainers("mathomp4", "tclune") | ||
|
||
version("4.10.0", sha256="ee5e899dfb786bac46e3629b272d120920bafdb7f6a677980fc345f6acda0f99") | ||
version("4.9.0", sha256="caea019f623d4e02dd3e8442cee88e6087b4c431a2628e9ec2de55b527b51ab6") | ||
version("4.8.0", sha256="b5c66ab949fd23bee5c3b4d93069254f7ea40decb8d21f622fd6aa45ee68ef10") | ||
version("4.7.4", sha256="ac850e33ea99c283f503f75293bf238b4b601885d7adba333066e6185dad5c04") | ||
|
@@ -113,6 +114,7 @@ class Pfunit(CMakePackage): | |
depends_on("mpi", when="+mpi") | ||
depends_on("esmf", when="+esmf") | ||
depends_on("m4", when="@4.1.5:", type="build") | ||
depends_on("[email protected]:", when="@4.10.0:") | ||
depends_on("fargparse", when="@4:") | ||
depends_on("[email protected]:", type="build") | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
# SPDX-License-Identifier: (Apache-2.0 OR MIT) | ||
|
||
import os | ||
import re | ||
|
||
from spack.package import * | ||
|
||
|
@@ -30,6 +31,7 @@ class Yafyaml(CMakePackage): | |
|
||
version("main", branch="main") | ||
|
||
version("1.4.0", sha256="2a415087eb26d291ff40da4430d668c702d22601ed52a72d001140d97372bc7d") | ||
version("1.3.0", sha256="a3882210b2620485471e3337d995edc1e653b49d9caaa902a43293826a61a635") | ||
version("1.2.0", sha256="912a4248bbf2e2e84cf3e36f2ae8483bee6b32d2eaa4406dd2100ad660c9bfc6") | ||
version("1.1.0", sha256="f0be81afe643adc2452055e5485f09cdb509a8fdd5a4ec5547b0c31dd22b4830") | ||
|
@@ -60,6 +62,35 @@ class Yafyaml(CMakePackage): | |
msg="yaFyaml only works with the Fujitsu compiler from 1.3.0 onwards", | ||
) | ||
|
||
# GCC 13.3 and higher only work with yafyaml 1.4.0 onwards | ||
# First we can check if the spec is [email protected]... | ||
conflicts("%[email protected]:", when="@:1.3.0", msg="GCC 13.3+ only works with yafyaml 1.4.0 onwards") | ||
|
||
# ...but if it is not (say apple-clang with gfortran as a fc), there is | ||
# no easy way to check this. So we hijack flag_handler to raise an | ||
# exception if we detect gfortran 13.3 or 14. | ||
# NOTE: This will only error out at install time, so `spack spec` will | ||
# not catch this. | ||
def flag_handler(self, name, flags): | ||
# We need to match any compiler that has a name of gfortran or gfortran-* | ||
pattern = re.compile(r"gfortran(-\d+)?$") | ||
|
||
if pattern.search(self.compiler.fc): | ||
gfortran_version = spack.compiler.get_compiler_version_output( | ||
self.compiler.fc, "-dumpfullversion" | ||
).strip() | ||
|
||
# gfortran_version is now a string like "13.3.0". We now need to just capture | ||
# the major and minor version numbers | ||
gfortran_version = ".".join(gfortran_version.split(".")[:2]) | ||
|
||
if self.spec.satisfies("@:1.3.0") and (float(gfortran_version) >= 13.3): | ||
raise InstallError( | ||
f"Your gfortran version {gfortran_version} is not compatible with " | ||
f"yafyaml 1.3.0 and below. Use yafyaml 1.4.0 or higher." | ||
) | ||
return None, None, None | ||
|
||
variant( | ||
"build_type", | ||
default="Release", | ||
|