Skip to content

Floating-point exceptions - #579

Open
mwarusz wants to merge 9 commits into
E3SM-Project:developfrom
mwarusz:omega/fpexcept
Open

mwarusz wants to merge 9 commits into
E3SM-Project:developfrom
mwarusz:omega/fpexcept

Conversation

@mwarusz

@mwarusz mwarusz commented Sep 28, 2026

Copy link
Copy Markdown
Member

This PR does three things

  • Adds infrastructure for enabling/disabling floating-point exceptions to Omega
  • Enables floating-point exceptions in Omega unit tests when compiling with gnu
  • Fixes a few issues that were exposed by enabling exceptions

Some of the exposed issues are known and have a bugfix PR (#562 and #575). The fixes are also included here in order to make CTests pass. Note that enabling traps on floating-point exceptions without informing the compiler about it through appropriate compiler flags can results in false positives. That's why I enabled them automatically in tests only with gnu, where the flag -ftrapping-math is on by default, and I don't think cime ever changes it. I added a CMake option to enable exceptions with other compilers.

Checklist

  • Documentation:

  • Linting

  • Building

    • CMake build does not produce any new warnings from changes in this PR
  • Testing

    aurora, oneapi-ifx, mpich

    • CTests Pass
    • Polaris omega_pr Pass

    chrysalis, oneapi-ifx, openmpi

    • CTests Pass
    • Polaris omega_pr Pass

    frontier, craygnu, mpich

    • CTests Pass
    • Polaris omega_pr Pass

    frontier, craygnu-mphipcc, mpich

    • CTests Pass
    • Polaris omega_pr Pass

    pm-cpu, gnu, mpich

    • CTests Pass
    • Polaris omega_pr Pass

    pm-gpu, gnugpu, mpich

    • CTests Pass
    • Polaris omega_pr Pass
  • Provide relevant details in a comment to the PR titled Testing with the following:

    • Which machines CTest unit tests
      have been run on and indicate that are all passing.
    • The Polaris omega_pr test suite
      has passed, using the Polaris e3sm_submodules/Omega baseline
    • Document machine(s), compiler(s), and the build path(s) used for -p for both the baseline (Polaris e3sm_submodules/Omega) and the PR build
    • Indicate "All tests passed" or document failing tests
    • Document testing used to verify the changes including any tests that are added/modified/impacted.
  • New tests:

    • CTest unit tests for new features have been added per the approved design.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant