Release Notes for Monte Carlo eXtreme v2019.4 (1.4.9)

Code name: Ether Dome, released on April 29, 2019

Click this link to download MCX v2019.4

Acknowledgement: This software release is made possible with the funding support from the NIH/NIGMS under grant R01-GM114365.

1. Introduction
2. About this release
3. What's new compared to v2019.3
4. System requirements
5. Reference

1. Introduction

Monte Carlo eXtreme, or MCX, is an ultra-fast Monte Carlo light transport simulator for arbitrary 3D random media. It uses Graphics Processing Units (GPU) to run thousands of photons simultaneously, and is typically hundreds or thousands times faster than a single-threaded CPU-based simulation.

This release fully supports all major NVIDIA GPU architectures ranging from Fermi, Kepler, Maxwell, Pascal, and Volta, as well as future generations. The speed comparisons between different generations of NVIDIA GPUs can be found at

2. About this release

MCX v2019.4 (code named "Ether dome" - a landmark of Massachusetts General Hospital, USA) is significantly improved over the version 2019.3 released just a month ago.

The most notable features of this new release include two new options (--savedetflag and --multibyte) in mcx and mcxlab aiming for significantly expanded flexibility and generality.

The first option (-w/--savedetflag) permits user-defined detected photon data selection. Previously, if -d 1 is set, mcx outputs all fields related to the detected photon, including detector ID, partial scattering count, partial path, initial weight etc. Now, a user can simply use -w followed by a combination of 7 letters to output specific fields:

  • d output detector ID (1)
  • s output partial scat. even counts (#media)
  • o output partial path-lengths (#media)
  • m output momentum transfer (#media)
  • x output exit position (3)
  • v output exit direction (3)
  • w output initial weight (1)
This new option allows users to simulate domains with more segmentation and better utility of shared memory and global memory to accommodate large detected photon numbers.

The 2nd big addition is the support of continuously varying (voxel-based) media. In all previous MCX releases, we only support segmentation-based media input. With the extended -K/--multibyte flag, it can now support 8 different media volume formats - not only including the label-based media (byte, short, integer), but also continuously varying mua and mua/mus with floating point or gray-level values. This makes it possible to simulate wide varieties of complex domains, especially when using mcx in iterative reconstructions.

Another new feature is the output of averaged partial path data on all surface voxels. This was motivated by one of our projects and is very helpful for sensitivity analyses. Moreover, we have added json2mcx.m, to convert mcx json input to mcxlab cfg structure (the reverse - mcx2json.m - was already supported).

Please visit our wiki website ( for more detailed documentation, demos and tutorials.

3. What's new compared to v2019.3

Compared to the previous release (version v2019.3, released in March 2019), MCX v2019.3 gains the following new features and bug fixes:

  1. !!key!! Support -w / --savedetflag to specify which det photon data to output
  2. !!key!! Support continuously varying media - mua/mus can vary in every voxel
  3. !!key!! Combining partial path on the surface
  4. !!key!! Can simulate infinite media using cyclic boundary condition - see demo_infinite_slab_cyclic_bc.m
  5. Add json2mcx.m to convert mcx json input to mcxlab cfg
  6. Mcxstudio: merge output window back to main
  7. Compile to dynamic lib, add function to enable library calls
  8. fix empty string test to avoid crash

Pre-compiled MCX are provided for Windows (64 bit), Linux (64bit) and Mac OS (64bit). In the case of MCXLAB, mex files for both Matlab and Octave on these platforms are provided. All binaries have been tested on Kepler, Maxwell, Pascal, Volta, and Turing GPUs.

All released binaries are compiled and linked with CUDA 7.5 (which is "embedded" into the binary) due to faster speed. All pre-compiled binaries are meant to be executable out-of-box.

The provided binaries require a Kepler (Compute Capability 3.0) or newer GPU. If you have an older GPU (CC 1.0 or 2.0), you will have to download MCX's source code, and replace sm_30 in mcx/src/Makefile by sm_20 and recompile using CUDA 8.0 or earlier.

The detailed change logs can be found in the ChangeLog and Github commit history pages.

4. System requirements

To install MCX version v2019.4, you need

  • a CUDA-enabled graphics card made by NVIDIA (essentially all GPUs made by NVIDIA today)
  • the latest graphics driver for your graphics card

In this release, all precompiled binaries, including both mcx executables and mcxlab mex files, have built-in CUDA run-time libraries via static linking. Therefore, downloading/setting CUDA toolkit and the run-time librarie files (cudart.dll/ are no longer needed.

However, if you run into CUDA errors, please first try to update your NVIDIA graphics driver to the latest version

If the latest graphics driver still can not solve the problem, please download the "developer driver" for your GPU. You may download the developer driver as part of the CUDA Toolkit installation package.

5. Reference

Powered by Habitat