Skip to content

ocean_sea_test: built without FMA contraction, as cvc::ocean is - #1146

Merged
transfix merged 1 commit into
masterfrom
fix/ocean-sea-test-no-fma
Nov 11, 2026
Merged

transfix merged 1 commit into
masterfrom
fix/ocean-sea-test-no-fma

Conversation

@transfix

Copy link
Copy Markdown
Owner

OceanSea.IsTheSameOnEveryPlatform (from #1142) fails on both macOS arm64 recipe lanes: the digest is 0x1966448ffbcd6035, not 0x21bcce29d45653a8. #1142 merged with its macOS lanes cancelled (--auto stops at the five required checks), so the lanes first ran it on the next PR, transfix/libcvc#925. Every PR's macOS recipe lanes are red until this lands.

Cause: cvc::ocean's sources are built with -ffp-contract=off, but the test computes the sea's sample points itself (x = 5.0 + 2.6 * i, y = 0.5 + 0.13 * i). Clang contracts those into FMAs on aarch64, which round once instead of twice. Computed exactly, x differs at i = 23 and y at i = 29 and 58, so the sea is sampled at other points and the digest moves. Linux x86_64 and MSVC don't contract here, which is why they agree with the value measured on Windows.

Fix: build ocean_sea_test.cpp with -ffp-contract=off (/fp:precise on MSVC), as nav_potential_test and the dyn plant tests already are, for the same reason.

Not checked on arm64 here: the macOS recipe lanes on this PR are the check.

OceanSea.IsTheSameOnEveryPlatform (#1142) fails on both macOS arm64 recipe
lanes (digest 0x1966448ffbcd6035, not 0x21bcce29d45653a8); #1142 merged with
its macOS lanes cancelled, so this is the first time they ran it. cvc::ocean's
sources are built with -ffp-contract=off, but the test computes the sea's sample
points itself (x = 5.0 + 2.6 * i, y = 0.5 + 0.13 * i), and clang contracts those
into FMAs on aarch64. With one rounding instead of two, x differs at i = 23 and
y at i = 29 and 58, so the sea is sampled elsewhere and the digest moves. x86_64
Linux and MSVC do not contract here, so they agree with the Windows value.

Build ocean_sea_test.cpp with -ffp-contract=off (/fp:precise on MSVC), as
nav_potential_test and the dyn plant tests are for the same reason.
@transfix
transfix merged commit 4c5899d into master Nov 11, 2026
33 checks passed
@transfix
transfix deleted the fix/ocean-sea-test-no-fma branch November 11, 2026 19:53
transfix added a commit that referenced this pull request Nov 11, 2026
Picks up #1146, which builds ocean_sea_test without FMA contraction: OceanSea.IsTheSameOnEveryPlatform failed every macOS job here, as it did on master.
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