Skip to content

FMS 2025.3 built with oneAPI@2025.{2,3}.1 ifx optimizes code to create a divide by zero error #2041

@rickgrubin-noaa

Description

@rickgrubin-noaa

Description

For spack-stack@2.x / FMS@2025.3 (see configs/common/packages.yaml), ifx will optimize away a check for dividing by zero.

To Reproduce

See the reproducer code in the issue noted above.

Expected behavior

ifx does not optimize away checks for division by zero.

System, compiler, code, ...

  • All RDHPCS hosts
  • ifx@2025.{2,3}.1

Additional context

This is not a bug with spack / spack-stack per se, noting it here for the sake of completeness.

This is solved by adding the following stanza to configs/common/packages.yaml for package fms

      - any_of:
        - 'fflags="-fp-speculation=safe"'
        when: '%oneapi'
        message: Reduce aggressive speculative optimization for ifx

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is not working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions