Release Notes for Monte Carlo eXtreme - OpenCL v2018

code name: Duality, released on August 20, 2018

Click this link to download MCX-CL/MCXLAB-CL v2018

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. System requirements
4. Features that are available on MCX but not yet ported to MCXLAB
5. Reference

0. Opening Remarks

We are proud to share with you that the first formal release of MCX-CL (v2018) is finally here! MCXCL is the first reported general purpose OpenCL-based MC simulator for photon transport modeling. It extends our GPU accelerated MC work (MCX) from NVIDIA-only hardware to nearly all mainstream CPUs and GPUs that are available today. The portability and scalability of MCXCL is unprecedented - it runs on Intel CPUs, Intel's integrated GPUs, almost all AMD CPUs and GPUs as well as NVIDIA GPUs currently in production (and future generations). If your processor has four cores, MCXCL will take 4; if it has 4000 cores, MCXCL will happily make use of all 4000 of them fully automatically and transparently to the user. It not only can run on different processors made by many processor vendors, but also can run simulations on multiple of them simultaneously, even mixing CPUs and GPUs, to maximize throughput.

Although the initial working version of MCX-CL was coded back in 2010, and publicly announced in 2012, we have been continuously developing, studying, optimizing this unique software and keeping it in sync for every new feature we added to it's CUDA sibling, MCX. Over the past two years, we have been systematic studying and benchmarking MCXCL and optimized its performance. The results of these investigations were summarized in a JBO Letter paper we published earlier this year

We demonstrated that MCXCL can get impressive speedup, similar to MCX, when running on a high-performance GPU; even running it on a multi-core CPU can be faster than most existing CPU-only MC codes. We also showed our GPU optimization strategies, load-balancing strategies as well as benchmark results across many different processors.

As of today, MCXCL has most core features as in MCX - wide-field and complex source support, 3D arbitrary media, partial-path length and photon detection, matlab mex file, JSON input, interoperability with MCXStudio, and many more. In fact, both MCXCL binary and MCXLAB-CL share nearly identical input parameters and interface as their CUDA counterparts. An input file that works for MCX can be directly executed using MCXCL and MCXLAB-CL without change. This makes it effortless for someone to run high performance MC simulations on non-NVIDIA hardware.

In April 2018, we have used MCXCL as our primary tool in our 2nd MCX Training Workshop during the OSA BIOMED conference. The code had become solidified after extensive testing by both the developers and the workshop trainees. As a result, we felt that it is time to introduce MCXCL to everyone and bring high performance and highly salable MC simulations to the hands of researchers worldwide.

1. Introduction

MCX-CL (or MCX for OpenCL) is a high-performance, highly scalable and general-purpose Monte Carlo photon transport simulator for biophotonics applications. Compared to MCX (implemented with NVIDIA CUDA), MCXCL is written in the OpenCL framework, and is capable of launching parallel photon simulations on most modern CPUs and GPUs produced by many vendors, including NVIDIA, AMD and Intel.

MCX-CL shares nearly identical command line options and input file formats as MCX. The simulation settings designed for MCX can be simply used for MCX-CL simulations without major modifications. There are only a few features in MCX that have not yet been ported to MCXCL, such as photon replay, we are working on those and hopefully make both software 100% compatible.

Similar to MCXLAB, MCXLAB-CL is the MATLAB mex version of the MCXCL software. It can be directly called inside MATLAB and GNU Octave. It also uses the same input structure settings as in MCXLAB, making both packages highly compatible. One can even define USE_MCXCL=1 in MATLAB command window, and all MCXLAB calls will call MCXLAB-CL automatically.

2. About this release

MCXCL/MCXLAB-CL v0.8 contains a [MCXCL/ChangeLog list of important new features as well as bug fixes].

Over the past two years, we have gradually ported all key features from MCX to MCXCL, including

  1. !!key!! port complex source support from mcx
  2. !!key!! accept full json input in the command line
  3. !!key!! port saveref from mcx to save diffuse reflectance
  4. !!key!! fix floating point accummulation error, port from mcx #41
  5. !!key!! changes to compile mcxcl.mex using mingw64 g++ on Windows
  6. !!key!! port progress bar from mcx (AMD device only)
  7. !!key!! port mcxlab as mcxlabcl
  8. !!key!! integer media,savenii,mcxstudio flags
  9. incorporate Leiming's workgroup load-balancing,simulate exact photon number
  10. auto tune AMD autothread number and Intel GPU thread numbers

Pre-compiled MCXCL and MCXLAB-CL binaries are provided for Windows, Linux and Mac OS.

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

3. System requirements

In all cases, the OpenCL library (*, OpenCL.dll or /System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL on the Mac) must be preinstalled in your system. Typically, these libraries are automatically installed after you installed your integrated or discrete GPU graphics driver.

The lowest OpenCL support version is OpenCL 1.0. Essentially, nearly all OpenCL compliant processors can run MCXCL/MCXLAB-CL.

Step-by-step installation guide can be found in this link.

4. Features that are available on MCX but not yet ported to MCXLAB

The below features have not yet been ported to MCXCL:

  • Photon replay for building Jacobians
  • storing photon trajectory data
  • saving momentum transfer for DCS simulations
  • displaying progress bar on NVIDIA/Intel processors

we are working hard to port these features to MCXCL and MCXLABCL.

5. Reference

Powered by Habitat