McCode / Monthly development summaries
McCode development summary, November 2026
Covers 11 Oct – 11 Nov 2026.
Three releases went out: 3.10.0 (23 Oct), 3.10.1 (30 Oct) and 3.10.2 (2 Nov). 3.10.3 is in draft. About 570 commits landed on main, and mccode-antlr went from 0.34 to 0.36.
Things that change your workflow
- Results change for a fixed seed. Every ray now gets its own independent seed (default KISS generator), which removes repeated sequences across MPI ranks and GPU batches. Reference data from before 3.10.0 will not reproduce.
- NeXus is now written with plain HDF5. napi/libNeXus is no longer a dependency. Files are compressed by default.
- MPI event lists are split per rank. They are written as one HDF5 file per rank, joined by virtual data sets, so
mccode.h5is not self-contained. Runh5repackbefore moving it; the run prints how. - Install locations moved. Debian/Ubuntu packages now come from
mccode-dev.github.io/debian, replacing packages.mccode.org. macOS and Windows bundles are attached to the GitHub releases. - MCPL defaults changed.
MCPL_input_onceis obsolete, andMCPL_inputnow does the MPI splitting plusrepeat_count.MCPL_outputdefaults toweight_mode=1(the MCPLstat:sumconvention). cif2hkl1.5.0 or newer is required. Structure factors are now given in barns.- Test headers are renamed.
%Example:becomes%Test:and%Scan:becomes%TestScan:; the old names are still accepted.mctestgains--nsigma/--pvalueacceptance,-jfor parallel compiles and-n0for compile only.
Physics fixes that change numbers
- Planar monitors: about 40 of them (
PSD_monitor,L_monitor, …) now restore the ray on a miss; previously such rays could be lost. - McStas samples:
Phonon_simpleand the UnionPhononSimple_processgive about 12.7× higher intensity (Squires normalisation). The UnionIncoherentPhonon_processweight is fixed, and the conic mirrors (conic.h) are corrected. - McXtrace:
Bending_magnetflux,Mirror_curvedandSingle_crystalabsorption are fixed. SOLEIL beamlines are realigned, including the Si lattice constant.Source_labnow uses xraylib. - Coming in 3.10.3:
- McXtrace lenses are corrected (
Lens_parab,Lens_CRL_RTM, …). Single_crystal_inelasticno longer depends on neutron order or MPI split.read_table-libhandles decreasing tables correctly.
- McXtrace lenses are corrected (
GPU / OpenACC (3.10.2)
- Newly ported to GPU:
- the 16 standalone
MCViNE_*sample components; - McStas
SANSNanodiscs*,SANSCylinders,SANSEllipticCylindersandSANSPDBFast, which also no longer need GSL; - the matching McXtrace SAXS variants (Nanodiscs, Cylinders, EllipticCylinders, PDBFast).
- the 16 standalone
- GPU race fixes in existing components, from a systematic component review:
- samples:
Isotropic_Sqwand the SANS sphere, shell and curve samples; - optics: gravity guides, transmission polarisers,
PerfectCrystalandSupermirrorFlat.
Anyone running these on GPU should re-check older results.
- samples:
- CI: a compile-only OpenACC (nvhpc) leg now catches GPU build breaks on every PR.
For component and instrument authors
- Name clashes: do not use
Ias an identifier, since it clashes with<complex.h>. Generic globals were prefixed:sign→conic_sign,square/cube→sas_square/sas_cube. - Removed or changed grammar:
DETECTOR_OUT_3Dis gone. AnINHERITsection written in the child, even an empty one, now replaces the parent’s. - Meshes: the new
geometry-mesh-libreads STL, OFF and PLY.Union_meshuses it now, andMonitor_nDgeometry=will from 3.10.3. - Drawing:
mcdis_pencolor("#rrggbb")switches pen colour insideMCDISPLAY, and many components draw filled surfaces at--trace=2. - Pull requests: the PR template must be filled in, and
AGENTS.mdnow sets the rules for AI-assisted contributions.
New tools and infrastructure
- Plotting:
mcplot,mcplotdiffandmccoplotread NeXus output.mcplot-ploppandmcdisplay-plopp(Scipp/Plopp) are available as previews. - Display:
mcdisplay-webgl-classicshows--trace=2shapes by default, with Surfaces/Lines toggles and double-click to focus (the latter in 3.10.3). - Timing: from 3.10.3, wall-clock time for
INITIALIZE,TRACEandFINALLYis written tomccode.simand NeXus. - Nightly sites: the McStas and McXtrace test suites, and the ESS instruments run against main, publish results every night.
- CI: a FreeBSD source-build track was added.
Websites and release cycle
- New landing page at mccode.org. It links everything below. All of it is now served from GitHub Pages, built from repos in the
mccode-devorganisation.- mcstas.org and mcxtrace.org: rebuilt hourly, and pick up a new release (version, manuals, component docs) by themselves.
- mccode.org/debian: the apt repository for amd64 and arm64, including
cif2hkl. It is refreshed every 3 hours and carries a new release once its builds are attached. - Nightly test results: McStas, McXtrace and ESS instruments.
- Docs for mccode-antlr, McStasToX and McStasScript.
- Still on the old DTU server:
packages.mccode.orgis marked inactive and points to the new apt repository.download.mcstas.orgstill holds the old download archive, but a00_README.TXTat the top marks it as deprecated: from 3.10.2, use the binaries attached to the GitHub releases and the install pages on GitHub. - Release cycle is written down in
docs/RELEASE-CHECKLIST.md:- Publishing a GitHub release with tag
vX.Y.Ztriggers the rest: platform builds are attached after about 1 hour, then the apt repository and both websites follow. - Install instructions are updated by an automatic PR. conda-forge follows through the feedstocks.
- Major and minor releases (4.0.0, 3.11.0) are announced on the mailing lists. Bugfix releases (3.10.3) are not, so watch the GitHub releases page for those.
- Publishing a GitHub release with tag
McStasScript
Two releases: 0.0.96 (22 Oct) and 0.0.97 (10 Nov).
- Components that use
DEFINE COMPONENT ... INHERITnow show their inherited parameters. - The matplotlib instrument view supports component opacity and custom colours, and axis limits in the 2D projections.
- Package imports are lazy, and IPython is an optional dependency.
- A Windows problem running
mcdisplay-webgl-classicfrom Python is fixed.