MCX v2019.3 (Ether Dome - beta)
Release Notes for Monte Carlo eXtreme v2019.3 (1.4.8)
Code name: Ether Dome - beta, released on March 18, 2019
Click this link to download MCX v2019.3
Acknowledgement: This software release is made possible with the funding support from the NIH/NIGMS under grant R01-GM114365.
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
About this release
MCX v2019.3 (code named "Ether dome" - a landmark of Massachusetts General Hospital) contains
numerous improvements developed over the past 7 months, including [[Doc/ChangeLog|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.
http://mcx.space/wiki/index.cgi?Demo/MCXStudio
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.
What's new compared to v2018
Compared to the previous release (version v2017.7, released in July 2017), MCX v2018 gains the following new features and bug fixes:
Compared to the previous release (version v2018, released in August 2018),
MCX v2019.3 gains the following new features and bug fixes:
- '''!!key!!''' Support 4 different boundary conditions (total absorption, total reflection/mirror, Fresnel reflection and cylic), controlled independently (--bc/cfg.bc) at 6 facets of the domain
- '''!!key!!''' Add 4 built-in complex domain examples - Colin27 brain atlas, USC_19-5 brain atlas, Digimouse, and mcxyz skin-vessel benchmark
- '''!!key!!''' Support isotropic launch for all focuable sources - gaussian, pattern, pattern3d, fourier, disk, fourierx, fourierx2d, and slit - by setting cfg.srcdir(4) to nan
- '''!!key!!''' Add GPU-ANLM denoiser, mcxfilter.m, to mcxlab to reduce MC fluence noise, detailed in our [Yao2018] paper
- '''!!key!!''' Initial support of "photon sharing" - a fast approach to simultaneously simulate multiple pattern src/det, as detailed in our Photoncs West 2019 talk by Ruoyang Yao/Shijie Yan [Yao&Yan2019]
- '''!!key!!''' First release of MCX Viewer - a built in 3D fluence rendering tool in mcxstudio (mcxviewer and mcxshow also provided separately)
- '''!!key!!''' Output partial scattering event counts in detected photon data, similar to MMC
- Add CMake support
- python-based mch file reader (by Shih-Cheng Tu)
- nightly build compilation script,
- colored command line output
In the meantime, a number of critical bugs were fixed:
- fix mcxlab gpuinfo output crash using multiple GPUs
- disable linking to Intel OMP library (libiomp5) to avoid MATLAB 2016-2017 crash
- fix mcxlab crash when srcpattern/srcdir/srcpos/detpos are not in double precision
- fix shared memory allocation size bug
- add the missing photon exit position in the trajectory output
- fix mcxlab crash due to racing in multi-threads
- force g to 1 in region where mus is 0
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.
System requirements
To install MCX version v2019.3, 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/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
http://www.nvidia.com/Download/index.aspx?lang=en-us
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.
https://developer.nvidia.com/cuda-downloads
Reference
-
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).
-
Leiming Yu, Fanny Nina-Paravecino, David Kaeli, Qianqian Fang, "Scalable and massively parallel Monte Carlo photon transport simulations for heterogeneous computing platforms," J. Biomed. Opt. 23(1), 010504 (2018).
-
Qianqian Fang and David A. Boas, "Monte Carlo Simulation of Photon Migration in 3D Turbid Media Accelerated by Graphics Processing Units," Opt. Express, vol. 17, issue 22, pp. 20178-20190 (2009)