镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

[LinearSystem] Add tests: the global matrix depends on the addresses of the components - #6425

Open
fredroy wants to merge 1 commit into
sofa-framework:masterfrom
fredroy:deterministic_matrix_assembly_test
Open

fredroy wants to merge 1 commit into
sofa-framework:masterfrom
fredroy:deterministic_matrix_assembly_test

Conversation

@fredroy

@fredroy fredroy commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

MatrixLinearSystem builds the matrices of the components in the order of their addresses (maps keyed by pointers): the rounding of the sums of contributions to the same entries changes with the memory layout, from one run to another.

  • the same scene, its force fields allocated in two opposite orders: the assembled entry is 0 or 1 (three force fields add 1, 1e16 and -1e16 to it);
  • force fields created in the reverse order of their paths are built in the order of their addresses.

MatrixSystem_sameMatrixWhateverTheAddressesOfTheComponents shows that a different ordering lead to different results

[with-all-tests]


By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

@fredroy
fredroy requested a review from alxbilger October 20, 2026 23:00
@fredroy fredroy added pr: status to review To notify reviewers to review this pull-request pr: test PR adding test(s) in SOFA pr: AI-aided Label notifying the reviewers that part or all of the PR has been generated with the help of an AI labels Oct 20, 2026
…of the components

The force fields are allocated in an order and added to the scene graph in
the reverse order, so that the expected order (the scene graph) differs from
the order of their addresses.
@fredroy
fredroy force-pushed the deterministic_matrix_assembly_test branch from 4c5b696 to bed0fa0 Compare October 28, 2026 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: AI-aided Label notifying the reviewers that part or all of the PR has been generated with the help of an AI pr: status to review To notify reviewers to review this pull-request pr: test PR adding test(s) in SOFA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants