Skip to content

Conversation

@willend
Copy link
Contributor

@willend willend commented Jan 30, 2026

Free-form text area

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

This fixes an issue spotted by Cristy Kinane from ISIS where an instrument applying a brilliance-transfer calculation gave numbers that were systematically off.

To ensure proper operation across MPI and non-MPI settings we now use

  • DArray1D types for the in-instrument BT monitor (underlying arrays are calloc’ed and hence ensured to contain zeros)
  • Perform the array-operations on Master only
  • Add an MPI_Barrier to not get out of sync

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 instrument file

    • I have used the mcdoc utility and rendered a reasonable documentation page for the instrument (please attach as screenshot in comments!)
    • I have used the mctest utility to test the instrument (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 Jan 30, 2026

Screenshot 2026-01-30 at 13 05 23 Screenshot 2026-01-30 at 13 05 05

@willend willend merged commit 1821dd2 into mccode-dev:main Jan 30, 2026
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