Skip to content

ortools/sat/cuts_test.cc fails on aarch64-linux #4746

Closed

Description

@flokli

What version of OR-Tools and what language are you using?
Version: v9.12
Language: N/A

Which solver are you using (e.g. CP-SAT, Routing Solver, GLOP, BOP, Gurobi)
Running the test suite

What operating system (Linux, Windows, ...) and version?
NixOS on aarch64-linux

What did you do?
Steps to reproduce the behavior:

git clone https://github.com/NixOS/nixpkgs.git
cd nixpkgs
git fetch https://github.com/flokli/nixpkgs.git refs/heads/or-tools-tests
git checkout FETCH_HEAD
nix-build -A or-tools --argstr system aarch64-linux

… compare the same on a x86_64-linux machine.

What did you expect to see
The build to succeed

What did you see instead?
A failing test run on aarch64-linux (while it succeeds on x86_64-linux)

[----------] 3 tests from ImpliedBoundsProcessorTest
[ RUN      ] ImpliedBoundsProcessorTest.PositiveBasicTest
/build/source/ortools/sat/cuts_test.cc:910: Failure
Value of: data.terms[0].DebugString()
Expected: starts with "coeff=1 lp=0 range=7"
  Actual: "coeff=1 lp=1.11022e-16 range=7 expr=[1,-3] * [V2,V0] + -2"

[  FAILED  ] ImpliedBoundsProcessorTest.PositiveBasicTest (0 ms)
[ RUN      ] ImpliedBoundsProcessorTest.NegativeBasicTest
/build/source/ortools/sat/cuts_test.cc:966: Failure
Value of: data.terms[0].DebugString()
Expected: starts with "coeff=1 lp=0 range=7"
  Actual: "coeff=1 lp=1.11022e-16 range=7 expr=[1,3] * [V2,V0] + -5"

[  FAILED  ] ImpliedBoundsProcessorTest.NegativeBasicTest (0 ms)
[ RUN      ] ImpliedBoundsProcessorTest.DecompositionTest
/build/source/ortools/sat/cuts_test.cc:1033: Failure
Value of: slack_term.DebugString()
Expected: starts with "coeff=1 lp=0 range=7"
  Actual: "coeff=1 lp=1.11022e-16 range=7 expr=[1,-3] * [V4,V0] + -2"

[  FAILED  ] ImpliedBoundsProcessorTest.DecompositionTest (0 ms)
[----------] 3 tests from ImpliedBoundsProcessorTest (0 ms total)

[  FAILED  ] 3 tests, listed below:
[  FAILED  ] ImpliedBoundsProcessorTest.PositiveBasicTest
[  FAILED  ] ImpliedBoundsProcessorTest.NegativeBasicTest
[  FAILED  ] ImpliedBoundsProcessorTest.DecompositionTest

Make sure you include information that can help us debug (full error message, model Proto).

Anything else we should know about your project / environment
You should probably be able to reproduce this without the nix build too, it depends on the architecture.

Activity

  1. lperron commented on Aug 1, 2025

    @lperron
    Collaborator

    does it fail with 9.14 ?

  2. flokli commented on Aug 1, 2025

    @flokli
    ContributorAuthor

    I don't know. I saw the file not changing, the comparisons in ortools/sat/cuts_test.cc still look the same.

    Bumping to 9.14 is a lot of work, do you have a specific change in mind that changed behaviour? If so, I could cherry-pick that one and re-test with it, but bumping to 9.14 will take me a bit longer.

  3. lperron commented on Aug 1, 2025

    @lperron
    Collaborator
  4. lperron commented on Aug 1, 2025

    @lperron
    Collaborator
  5. flokli commented on Aug 1, 2025

    @flokli
    ContributorAuthor

    I understand, thanks. I'll report back once I bumped to the latest version.

  6. flokli commented on Nov 5, 2025

    @flokli
    ContributorAuthor

    After updating the nixpkgs or-tools expression to 9.14 (which was a fair bit of work, which is why I wasn't able to get back to this sooner) I'm still able to reproduce the test failures with 9.14:

    or-tools-aarch64-linux> [----------] 3 tests from ImpliedBoundsProcessorTest
    or-tools-aarch64-linux> [ RUN      ] ImpliedBoundsProcessorTest.PositiveBasicTest
    or-tools-aarch64-linux> /build/source/ortools/sat/cuts_test.cc:910: Failure
    or-tools-aarch64-linux> Value of: data.terms[0].DebugString()
    or-tools-aarch64-linux> Expected: starts with "coeff=1 lp=0 range=7"
    or-tools-aarch64-linux>   Actual: "coeff=1 lp=1.11022e-16 range=7 expr=[1,-3] * [V2,V0] + -2"
    or-tools-aarch64-linux> 
    or-tools-aarch64-linux> [  FAILED  ] ImpliedBoundsProcessorTest.PositiveBasicTest (0 ms)
    or-tools-aarch64-linux> [ RUN      ] ImpliedBoundsProcessorTest.NegativeBasicTest
    or-tools-aarch64-linux> /build/source/ortools/sat/cuts_test.cc:966: Failure
    or-tools-aarch64-linux> Value of: data.terms[0].DebugString()
    or-tools-aarch64-linux> Expected: starts with "coeff=1 lp=0 range=7"
    or-tools-aarch64-linux>   Actual: "coeff=1 lp=1.11022e-16 range=7 expr=[1,3] * [V2,V0] + -5"
    or-tools-aarch64-linux> 
    or-tools-aarch64-linux> [  FAILED  ] ImpliedBoundsProcessorTest.NegativeBasicTest (0 ms)
    or-tools-aarch64-linux> [ RUN      ] ImpliedBoundsProcessorTest.DecompositionTest
    or-tools-aarch64-linux> /build/source/ortools/sat/cuts_test.cc:1033: Failure
    or-tools-aarch64-linux> Value of: slack_term.DebugString()
    or-tools-aarch64-linux> Expected: starts with "coeff=1 lp=0 range=7"
    or-tools-aarch64-linux>   Actual: "coeff=1 lp=1.11022e-16 range=7 expr=[1,-3] * [V4,V0] + -2"
    or-tools-aarch64-linux> 
    or-tools-aarch64-linux> [  FAILED  ] ImpliedBoundsProcessorTest.DecompositionTest (0 ms)
    or-tools-aarch64-linux> [----------] 3 tests from ImpliedBoundsProcessorTest (1 ms total)
    or-tools-aarch64-linux> 
    or-tools-aarch64-linux> [----------] 3 tests from SumOfAllDiffLowerBounderTest
    or-tools-aarch64-linux> [ RUN      ] SumOfAllDiffLowerBounderTest.ContinuousVariables
    or-tools-aarch64-linux> [       OK ] SumOfAllDiffLowerBounderTest.ContinuousVariables (0 ms)
    or-tools-aarch64-linux> [ RUN      ] SumOfAllDiffLowerBounderTest.DisjointVariables
    or-tools-aarch64-linux> [       OK ] SumOfAllDiffLowerBounderTest.DisjointVariables (0 ms)
    or-tools-aarch64-linux> [ RUN      ] SumOfAllDiffLowerBounderTest.DiscreteDomains
    or-tools-aarch64-linux> [       OK ] SumOfAllDiffLowerBounderTest.DiscreteDomains (0 ms)
    or-tools-aarch64-linux> [----------] 3 tests from SumOfAllDiffLowerBounderTest (0 ms total)
    or-tools-aarch64-linux> 
    or-tools-aarch64-linux> [----------] Global test environment tear-down
    or-tools-aarch64-linux> [==========] 41 tests from 12 test suites ran. (222 ms total)
    or-tools-aarch64-linux> [  PASSED  ] 38 tests.
    or-tools-aarch64-linux> [  FAILED  ] 3 tests, listed below:
    or-tools-aarch64-linux> [  FAILED  ] ImpliedBoundsProcessorTest.PositiveBasicTest
    or-tools-aarch64-linux> [  FAILED  ] ImpliedBoundsProcessorTest.NegativeBasicTest
    or-tools-aarch64-linux> [  FAILED  ] ImpliedBoundsProcessorTest.DecompositionTest
    
  7. lperron commented on Nov 5, 2025

    @lperron
    Collaborator
  8. flokli commented on Nov 5, 2025

    @flokli
    ContributorAuthor

    @lperron feel free to send me a patch against 9.14, happy to test it on top of NixOS/nixpkgs#458786 (and ship the patch downstream until the next release). For nixpkgs, It'd be nice to also be able to ensure the tests pass on aarch64-linux.

  9. added a commit that references this issue on Nov 5, 2025
    8442c7b
  10. lperron commented on Nov 5, 2025

    @lperron
    Collaborator

    I have attached the fix.

  11. added a commit that references this issue on Nov 5, 2025
    dadaff8
  12. added this to the v10.0 milestone on Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions