Skip to content

Conversation

@willend
Copy link
Contributor

@willend willend commented Dec 16, 2025

Free-form text area

Please describe what your PR is adding in terms of features or bugfixes:

In the same line of thinking as #2272, this PR is meant to bring identical algorithmic behaviour across Unix/Windows, based on sorting Single_crystal reflection lists.

(Thinking is again that across operating systems, qsort() behaviour for 'equal' elements is not well-defined.)

I have run a few test-cases e.g. with templateLaue (which is a relatively 'clean' Single_crystal system) - here the output still differs for ~ 20 in 1e6 particles when comparing between macOS Arm and Windows Intel...

More investigations of where the differences lie may come later.


Development OS / boundary conditions

Please describe what OS you developed and tested your additions on, and if any special dependencies are required:


PR Checklist for contributing to McStas/McXtrace

For a coherent and useful contribution to McStas/McXtrace, please fill in relevant parts of the checklist:

  • My contribution includes patches to an existing component file

    • I have used the mcdoc utility and rendered a reasonable documentation page for the component (please attach as screenshot in comments!)
    • I have ensured that basic use of the component is OK (e.g. an instrument using it compiles?)
    • I have used the mctest utility to test one or more instruments making use of the component (please attach mcviewtest report as screenshot in comments)
    • I have used the mcrun --c-lint "linter" and followed advice to remove most / all warnings that are raised
  • My contribution contains something else

    • Explanation is added in free form text above or below the checklist

@willend
Copy link
Contributor Author

willend commented Dec 16, 2025

McXtrace conda/Windows fails "as normal" since complex number handling is not fully in place for MSVC in McXtrace

@willend
Copy link
Contributor Author

willend commented Dec 16, 2025

McStas Single_crystal test looks good:
Screenshot 2025-12-16 at 19 18 26
Screenshot 2025-12-16 at 19 18 45
Screenshot 2025-12-16 at 19 18 53

McStas Single_crystal_process test looks good:
Screenshot 2025-12-16 at 19 19 27

McXtrace Single_crystal test looks mostly good (with exception of Windows, as expected - and SOLEIL_PX2a should probably be looked at independently (same indication for earlier 'nightlies')
Screenshot 2025-12-16 at 19 21 39

@willend willend merged commit b475a52 into mccode-dev:main Dec 17, 2025
17 of 18 checks passed
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