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.3 (code named "Ether dome" - a landmark of Massachusetts General Hospital) contains numerous improvements developed over the past 7 months, including a list of new features and bug fixes. If you are currently using a previous release, you are strongly encouraged to upgrade to the latest version.
In this new release, the most notable update is the support of 4 different boundary conditions (BCs) - the total absorption BC (use letter "a",like "-b 0"), Fresnel BC (use letter "r",like "-b 1"), total reflection/mirror BC (use letter "m", new) and cyclic/periodic BC (use letter "c", new). One can specify these BCs using a new flag --bc (or cfg.bc in MCXLAB). For example, if one defines --bc ccrcca, it asks mcx to apply a cyclic BC when a photon attempts to escape from plane x=0 (first letter) and x=Nx (4th letter) - i.e. a photon exits from the x=0 plane re-enters from the x=Nx plane; similarly, y=0 and y=Ny planes also apply the cyclic BC; for z=0 plane (3rd letter), a photon performs Fresnel reflection/transmission, just like "-b 1"; on the z=Nz plane, a photon is immediately terminated if arrive at the first incidence (like -b 0) - i.e. total absorption. The support to multiple types of boundary conditions allows a user to simulate even more complex domains.
Another major addition is the built-in 3D volume renderer in MCXStudio. Previously, MCXStudio relies on external tools such as MATLAB or Octave for rendering simulation outputs. Starting from this version, MCXStudio has a OpenGL-based built-in 3D volume renderer. One can display slices across the simulated domain and set transparency threshold.
Moreover, we added an MC image denoisier, mcxfilter.m, as part of MCXLAB. We have shown that applying this filter to MCX's output, one can improve the SNR of the output fluece by 5dB - equivalent to simulating 3.5x more photons. The details of this work is reported in the below paper:
[Yuan2018] Yaoshen Yuan, Leiming Yu, Zafer Doğan, Qianqian Fang, "Graphics processing units-accelerated adaptive nonlocal means filter for denoising three-dimensional Monte Carlo photon transport simulations," J. of Biomedical Optics, 23(12), 121618 (2018).
In addition, we have added 4 ready-to-use complex domain examples - Colin27 brain atlas, USC_19-5 brain atlas, Digimouse, and mcxyz skin-vessel benchmark. The provided sample data and as well as simulation configurations can be readily used to explore a range of questions.
Please visit our wiki website (http://mcx.space/wiki/) for more detailed documentation, demos and tutorials.
Compared to the previous release (version v2018, released in August 2018), MCX v2019.3 gains the following new features and bug fixes:
In the meantime, a number of bugs have been fixed:
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.
To install MCX version v2019.3, 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.