Skip to content

McStas PSD_Detector (T v Wuure) gas-detector has "undefined behaviour" in McStas 3.6.1 #2267

@willend

Description

@willend

Looking at the results table from 3.6.1 I spotted numeric fluctuations / diverging output in HZB_NEAT testcase 1.

Experimenting a little with an Intel Ubuntu machine as well as my M2 MacBook Pro I found erratic output, depending on run/os conditions. All output earlier than the last PSD_Detector is identical.

macOS M2:
mcrun -c HZB_NEAT.instr -s1000 lambda=6 | grep Detector_I
Detector: Detector_I=2904.46 Detector_ERR=36.487 Detector_N=19860 "NEAT.psd"

macOS M2 mpi:
mcrun -c HZB_NEAT.instr -s1000 lambda=6 --mpi=2 | grep Detector_I
Detector: Detector_I=2871.53 Detector_ERR=36.3542 Detector_N=19698 "NEAT.psd"

Ubuntu 24.04.1 (Debian package):
mcrun -c HZB_NEAT.instr -s1000 lambda=6 | grep Detector_I
Detector: Detector_I=527.293 Detector_ERR=15.5595 Detector_N=3629 "NEAT.psd"

Ubuntu 24.04.1 (Debian package) mpi:
mcrun -c HZB_NEAT.instr -s1000 lambda=6 --mpi=2 | grep Detector_I
Detector: Detector_I=2871.53 Detector_ERR=36.3542 Detector_N=19698 "NEAT.psd"

Ubuntu 24.04.1 (conda package):
mcrun -c HZB_NEAT.instr -s1000 lambda=6 | grep Detector_I
Detector: Detector_I=527.293 Detector_ERR=15.5595 Detector_N=3629 "NEAT.psd"

Ubuntu 24.04.1 (conda package) mpi:
mcrun -c HZB_NEAT.instr -s1000 lambda=6 --mpi=2 | grep Detector_I
Detector: Detector_I=529.904 Detector_ERR=15.6395 Detector_N=3663 "NEAT.psd"

Investigations ongoing, observations:

  • no warnings / hints from cppcheck...
  • It seems that the same effect can be observed in ILL_IN4 and ILL_IN5 - but with fluctuations of lower magnitude...
  • Interestingly, Test_PSD_Detector does not show anything... Plot thickens...
  • Memory-issue quite probable... Exchanging Isotropic_Sqw for Incoherent, use of an MCPL_ouput to dump the beam all makes the issue (seemingly) go away...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions