Skip to content

fms: add 2025.03, 2026.01, and 2026.01.01#4737

Open
rem1776 wants to merge 8 commits into
spack:developfrom
rem1776:fms-2026-updates
Open

fms: add 2025.03, 2026.01, and 2026.01.01#4737
rem1776 wants to merge 8 commits into
spack:developfrom
rem1776:fms-2026-updates

Conversation

@rem1776
Copy link
Copy Markdown
Contributor

@rem1776 rem1776 commented May 7, 2026

Updates the fms package for the past 3 releases. Includes patches to disable the unit tests building by default.

Fixes #3596, NOAA-GFDL/FMS#1865,

@rem1776 rem1776 marked this pull request as ready for review May 7, 2026 16:17
@mathomp4
Copy link
Copy Markdown
Contributor

@rem1776 Your PR here is "above" mine in #3210

But in mine I also have an extra variant to allow for mixed precision:

https://github.com/spack/spack-packages/pull/3210/changes#diff-9e41468068bdebf1d7bc5e2e27e562dedf069b46d8405de850554dface0349cc

I also seem to have:

    # When https://github.com/NOAA-GFDL/FMS/pull/1787 is merged, we can uncomment the following
    # and allow back specified precision variants for 2026.0x and later.
    # variant(
    # "precision",
    # values=any_combination_of("32", "64", "mixed").with_default("mixed"),
    # description="Build a version of the library with mixed precision ('mixed' or 'none'), or 32 and/or 64 bit reals",
    # when="@2026.0x:",
    # )

commented out in there.

Any objections to adding in the mixed precision?

@mathomp4
Copy link
Copy Markdown
Contributor

I'm guessing 2026.01.01 might have NOAA-GFDL/FMS#1787 ?

@rem1776
Copy link
Copy Markdown
Contributor Author

rem1776 commented May 12, 2026

@rem1776 Your PR here is "above" mine in #3210

But in mine I also have an extra variant to allow for mixed precision:

https://github.com/spack/spack-packages/pull/3210/changes#diff-9e41468068bdebf1d7bc5e2e27e562dedf069b46d8405de850554dface0349cc

I also seem to have:

    # When https://github.com/NOAA-GFDL/FMS/pull/1787 is merged, we can uncomment the following
    # and allow back specified precision variants for 2026.0x and later.
    # variant(
    # "precision",
    # values=any_combination_of("32", "64", "mixed").with_default("mixed"),
    # description="Build a version of the library with mixed precision ('mixed' or 'none'), or 32 and/or 64 bit reals",
    # when="@2026.0x:",
    # )

commented out in there.

Any objections to adding in the mixed precision?

No objections here! I can add that in.

I'm guessing 2026.01.01 might have NOAA-GFDL/FMS#1787 ?

Yeah 2026.01.01 includes that change, which should also fix the build issue. I still included the patch just so that spack doesn't have to waste time building our unit tests.

Updated the precision variant to support mixed precision and adjusted the default value.
@mathomp4
Copy link
Copy Markdown
Contributor

@rem1776 I think we need all three:

    variant(
        "precision",
        values=any_combination_of("32", "64", "mixed").with_default("mixed"),
        description="Build a version of the library with mixed precision ('mixed' or 'none'), or 32 and/or 64 bit reals",
        when="@2026.01.01:",
    )

    # NOTE: For FMS 2025.04 to 2026.01, only mixed precision ('none') is supported.
    # Since a single variant is no variant, we do not have a precision variant for these versions.

    variant(
        "precision",
        values=("mixed",),
        description="Build a version of the library with mixed precision (both 32 and 64 bit reals). "
        "NOTE: This is the only supported precision variant for FMS versions 2025.04 to 2026.01",
        default="mixed",
        multi=True,
        when="@2025.04:2026.01",
    )

    variant(
        "precision",
        values=("32", "64"),
        description="Build a version of the library with default 32 or 64 bit reals or both",
        default="32",
        multi=True,
        when="@2022.04:2025.03",
    )

The issue is that 2025.04 and 2026.01 only support mixed precision (which 2026.01.01 fixed)

@rem1776
Copy link
Copy Markdown
Contributor Author

rem1776 commented Jun 3, 2026

@rem1776 I think we need all three:

    variant(
        "precision",
        values=any_combination_of("32", "64", "mixed").with_default("mixed"),
        description="Build a version of the library with mixed precision ('mixed' or 'none'), or 32 and/or 64 bit reals",
        when="@2026.01.01:",
    )

    # NOTE: For FMS 2025.04 to 2026.01, only mixed precision ('none') is supported.
    # Since a single variant is no variant, we do not have a precision variant for these versions.

    variant(
        "precision",
        values=("mixed",),
        description="Build a version of the library with mixed precision (both 32 and 64 bit reals). "
        "NOTE: This is the only supported precision variant for FMS versions 2025.04 to 2026.01",
        default="mixed",
        multi=True,
        when="@2025.04:2026.01",
    )

    variant(
        "precision",
        values=("32", "64"),
        description="Build a version of the library with default 32 or 64 bit reals or both",
        default="32",
        multi=True,
        when="@2022.04:2025.03",
    )

The issue is that 2025.04 and 2026.01 only support mixed precision (which 2026.01.01 fixed)

They only worked with 'mixed' before due to a bug with cmake, but with the patches added by this PR all 3 options should now work for those two versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add recent FMS versions

2 participants