Release Notes for Monte Carlo eXtreme Version 0.5.0

code name: Black hole, released on Mar. 20, 2011

1. Introduction
2. About this release
3. What's new compared to 0.4.9 (aka 0.5.0-beta)
4. What's new compared to 0.2.0
5. System requirements
6. Known issues
7. What's next
8. Reference

1. Introduction

Monte Carlo eXtreme, or MCX, is a fast Monte Carlo simulation software for photon transport in 3D heterogeneous media. It uses Graphics Processing Units (GPU) based massively parallel computing techniques and is hundreds times faster compared to traditional single-threaded CPU-based simulations.

MCX is designed for high computational efficiency, accuracy and excellent portability. It contains 5 variant forms which are suited for a spectrum of pratical needs ranging from high simulation speed to accuracy-demanding applications. The software can be compiled on various platforms including Windows, Linux, Mac OS, and can be used with almost all generations of CUDA-capable devices (8800GT to Fermi).

2. About this release

MCX v0.5.0, codenamed "Black hole", is the second stable release and a result of 1.5-year continuous development of this software. The main features of this release include native Matlab/GNU Octave support via MCXLAB, recording exiting photon partial path lengths at detector sites (0.4.9), fast and accurate simulation using atomic operations in the shared memory (0.4.9) and adjustable voxel sizes of the simulation domain.

3. What's new compared to 0.4.9 (aka 0.5.0-beta)

The final release of v0.5 gains the followings compared to v0.4.9 published in Aug. 2010:

  1. new addition of MCXLAB, an easy-to-use interface to MCX for MATLAB and GNU Octave
  2. new addition of MCXLAB demos and validation scripts for MATLAB/Octave
  3. extensive debugging with the --unitinmm/-u flag, users can define grids with sub-millimeter resolutions
  4. added -E flag to seed RNG from command line, this can facilitate launching parallel jobs in a cluster
  5. initial support for refractive index mismatch at internal boundaries
  6. more intelligent autopilot mode (-A)
  7. fixed a bug when saving multiple blocks of detected photon information (*.mch)

Pre-compiled MCX were provided for both Windows (32/64bit) and Linux (32/64bit). In the case of MCXLAB, mex files for both Matlab and Octave on these platforms are provided. All binaries were tested on a Fermi GPU (GTX 470).

4. What's new compared to 0.2.0

The final release of v0.5.0 has significantly advanced beyond the previous stable release v0.2 published in Dec. 2009. Compared to v0.2, it has further gained:

  1. used shared memory atomic operations to improve accuracy near the source
  2. supported saving detected photon partial path-lengths
  3. enabled the -n flag for photon numbers, disable -m, report simulation speed
  4. used RNG for transmission/reflection test, significant speed-up when reflection is on
  5. used constant memory to pass kernel param, more error info
  6. allowed users to select GPU, this enables process-level parallelism for multi-GPU or GPU-clusters
  7. new addition of validation script for MCX in heterogeneous media
  8. used column major as the internal array format
  9. a critical bug fix for pre-Fermi cards for proper byte-alignment
  10. fixed a bug for indexing error in large volumes
  11. improvement of MCXStudio, a graphical user interface for MCX

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

5. System requirements

To install MCX v0.5.0, you need

  • a CUDA-enabled graphics card made by nVidia, a full list of supported cards can be found here
  • a computer running GNU/Linux, Windows or Mac OS
  • pre-installed CUDA driver and video driver, you can download from here

To use MCXLAB v0.5.0 in MATLAB, you must have a MATLAB pre-installed.

To use MCXLAB v0.5.0 in GNU Octave, you must install

  • GNU Octave
  • libblas, libgfortran and libhdf5

In all cases, CUDA libraries ( for Linux/Mac and cudart.dll for Windows) must be properly installed before you launch MCX.

6. Known issues

  1. the internal reflection code has not been tested extensively, please communicate with the author if you have any findings or comments
  2. in rare cases, MCXLAB may takes very long time to return and gave erroneous results. This is likely caused by a MATLAB issue and a fresh start of MATLAB can solve the problem.
  3. if you don't have a dedicated GPU, you may get the "kernel-launch-time-out" error when the simulation time is longer than a few seconds. This is a limitation of CUDA and please read the Doc/FAQ for suggestions.

7. What's next

We plan to apply for funding support to continue improving this software in the future. Your support, either by timely feedback on your experience with MCX, or letters supporting our future research plan as part of the proposals are highly appreciated. We will approach you in a future time when a proposal is prepared.

We are also looking forward to the collaboration opportunities with you to explore interesting projects where this software can help. Please feel free to email me (fangq at to discuss these options at any time.

8. Reference

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)

Powered by Habitat