McXtrace logo

McXtrace - An X-ray ray-trace simulation package

Synchrotron SOLEIL DTU Physics


About McXtrace
 Project Partners
 Project People


 Wiki (GitHub)

Mailing list



Code-repository (GitHub)

Report bugs (GitHub)

McXtrace - Monte Carlo Xray Tracing, is a joint venture by

DTU_logo.gif Soleil.png

Our code is based on technology from mcstas_logo_thumb.png

Code repository (shared with 'McStas') is located at

For information on our progress, please subscribe to our user mailinglist..

McXtrace News

The latest McXtrace news.

New ready-to-run McXtrace box in a browser

[18/02/2022] Dear all, we are happy to provide a ready-to-run system with McXtrace pre-installed. It typically pulls-out an 8-cores computer running at Binder, for free, with both McXtrace 1.7 and 3.0 (with MPI multi-core support but no GPU). Perfect for running McXtrace from anywhere, for training/schools/workshops.

Start it in a single click here:

(Please note that load-time can be a couple of minutes.)



The above docker image has been pushed to dockerhub and can also be run locally at your machine using docker:
  • Install docker (if needed)
  • docker run -p 8888:8888
  • Connect your browser to the URL communicated by the docker command

Updated RPM metapackages for McXtrace 3.0

[09/02/2022] Dear all,

If you were fast enough to try out installing McXtrace 3.0 already yesterday on your CentOS or Fedora system, you may have come across some installation issues, as the mcxtrace-suite-python-ng packages had a couple of shortcomings.

Updated packages have now been uploaded, please use yum clean and yum reinstall to have access to the updates.

McXtrace 3.0 is released

[08/02/2022] Dear all,

The McXtrace team is happy to announce that our McXtrace 3.0 "next generation" release is now available.

McXtrace 3.0 is the first release in the 3.0 series with a completely rewritten code-generator and thereby support for GPU-acceleration through the OpenACC programming model.

We have seen speedups of 1-2 orders of magnitude over the CPU version, depending on the computational Problem / complexity.


  • Thanks to: all members of the team (and also to the McStas team), for pulling together to make this possible.
  • Thanks to the mentors at the GPU Hackathons that really made this happen
  • Thanks to NVIDIA for making the hackathons happen


  • Installation instructions for McXtrace-3.0 and support libraries may be found on our the McCode github-site
  • OpenACC acceleration is at present available out of the box on Linux.
  • On windows it is possible to target GPU-acceleration through Windows Subsystem For Linux v2: WSL2.
  • The present McXtrace-3.0 implementation relies the concept managed memory, which is at the time of writing only supported by the Linux version of the NVHPC-kit (downloadable from

For more information on the GPU-features of the release, please consult the CHANGES_McXtrace document on GitHub and the section "Migrating from McStas 2.x to 3.x (and McXtrace 1.x to 3.x)" in our McCode wiki

Happy simulation!

McXtrace 1.7 is released

[25/01/2022] Dear simulators, The team is happy to announce that McXtrace 1.7 is out!

1.7 has been focused mainly on stability and bugfixes, but also provides a set of new features. Binary packages are provided for the main platforms: Debian /Ubuntu, Fedora, Windows 10, Mac OSX (arm and intel based). As is the presenty custom, see for speecific installation instructions for you platform.

Please also keep an eye out for the for upcoming release of McXtrace 3.0, which is a technology preview release of an improved code-generator enabling McXtrace to run on GPUs.

Happy simulation!

CHANGES in McXtrace 1.7

  1. Improved installation scripts
    1. Installs cleanly on Mac silicon
  2. Updated examples:
    1. MAXIV_DanMAX_pxrd1d.instr
    2. MAXIV_DanMAX_pxrd2d.instr
  3. New examples:
    1. SOLEIL ROCK beamline.
    2. ESRF BM29 skeleton beamline.
    3. Example of Air-scattering block.
    4. Test example for the GROUP langnuage feature
    5. Union demo test example
    6. New Example of Compton scattering union process.
  4. Updated Components
    1. PowderN.comp: Fix bug with faulty packing factor logic, which lead to wrong intensities when used with SPLIT.
    2. Lens_parab_Cyl_rough.comp, Lens_parab_rough.comp, Lens_Kinoform.comp: documentation issues
    3. Mirror.comp: documentation update
    4. Mirror_curved.comp, Mirror_elliptic.comp: Use reflectivity library
    5. Mirror_toroid.comp: Fix for stable handling of reflectivity file
    6. Absorption_sample.comp: Fix inner/outer volume logic
    7. Source_genesis13.comp, Source_simplex.comp: Documentation issues.
    8. Air.comp: Correct scattering amplitude.
    9. New: Laue_crystal_BC.comp: experimental model of a Laue crystal available for testing.
  5. Updated libraries:
    1. Reflectivity-lib has a series of bugfixes.
  6. New tools:
    1. Test tool for component writers' convenience.
    2. Scripts for generating reflectivity files.
  7. License change: The release includes a switch to the GPLv3-license for McXtrace. The underlying reason for this is to help collaboration wih the Debian project.

2021, 2020 and older News

Last Modified: Wednesday, 11-May-2022 22:46:02 CEST
Search website mailinglist archive GitHub repos