Skip to content

[BUG]: mcrun --mpi=auto does not function on Windows/conda with MSMPI #2351

@willend

Description

@willend

Describe the bug
Automatic selection of number of MPI cores (--mpi=auto) fails on Windows with MSMPI.

Workaround: Use an actual number (4, 8,…)

Document steps to reproduce the bug
Steps to reproduce the behavior:
Run any instrument with MPI and ‘auto’ number of cors, you will get

INFO: ===
INFO: Using system default number of mpirun -np processes
ERROR: Error reported: failed to launch ' BOA_beamline_monitors.exe --trace=0 --ncount=1000000.0 --dir=C:\Users\peterwillendrup\AMG-Beamlines-McStas\BOA\BOA_beamline_monitors_20260311_123453 --format=McCode --bufsiz=10000000 flagin=0 trompete_exit_slit_width=0.04 trompete_exit_slit_height=0.04 Lmin=1 Lmax=9 threshold=1e-12' on WIN11ARM2025
Error (3) The system cannot find the path specified.
INFO: call to mpiexec failed with Command 'mpiexec "" BOA_beamline_monitors.exe --trace=0 --ncount=1000000.0 --dir=C:\Users\peterwillendrup\AMG-Beamlines-McStas\BOA\BOA_beamline_monitors_20260311_123453 --format=McCode --bufsiz=10000000 flagin=0 trompete_exit_slit_width=0.04 trompete_exit_slit_height=0.04 Lmin=1 Lmax=9 threshold=1e-12' returned non-zero exit status 4294967292.

Expected behavior
Let auto mean that Python probes the number of available cores, e.g. via os.cpu_count()

OS and McStas/McXtrace version (please complete the following information):

  • OS: Windows - any version
  • McCode variant: McStas or McXtrace alike
  • Version: 3.x.y

Additional context
Issue spotted with Dylan C Bailey

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions