Acknowledgement: This software release is made possible with the funding support from the NIH/NIGMS under grant R01-GM114365.
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
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:
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 (http://mcx.space/wiki/) for more detailed documentation, demos and tutorials.
Compared to the previous release (version v2019.3, released in March 2019), MCX v2019.3 gains the following new features and bug fixes:
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.
To install MCX version v2019.4, you need
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/libcudart.so/libcudart.dylib) 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.