PyMercury: Interactive Python for the Mercury Monte Carlo Particle Transport Code

Monte Carlo particle transport applications are often written in low-level languages (C/C++) for optimal performance on clusters and supercomputers. However, this development approach often sacrifices straightforward usability and testing in the interest of fast application performance. To improve usability, some high-performance computing applications employ mixed-language programming with high-level and low-level languages. In this study, we consider the benefits of incorporating an interactive Python interface into a Monte Carlo application. With PyMercury, a new Python extension to the Mercury general-purpose Monte Carlo particle transport code, we improve application usability without diminishing performance. In two case studies, we illustrate how PyMercury improves usability and simplifies testing and validation in a Monte Carlo application. In short, PyMercury demonstrates the value of interactive Python for Monte Carlo particle transport applications. In the future, we expect interactive Python to play an increasingly significant role in Monte Carlo usage and testing.

[1]  T. J. Alumbaugh Dynamic Languages for HPC at LLNL , 2010 .

[2]  P. Mato,et al.  Reflection-Based Python-C++ Bindings , 2004 .

[3]  Richard Procassini,et al.  Verification and Validation of MERCURY: A Modern, Monte Carlo Particle Transport Code , 2004 .

[4]  Laxmikant V. Kalé,et al.  Dynamic high-level scripting in parallel applications , 2009, 2009 IEEE International Symposium on Parallel & Distributed Processing.

[5]  Forrest B. Brown,et al.  VERIFICATION OF MCNP5 , 2003 .

[6]  David Abrahams,et al.  Building hybrid systems with Boost.Python , 2003 .

[7]  M G Stabin,et al.  Monte Carlo MCNP-4B-based absorbed dose distribution estimates for patient-specific dosimetry. , 2001, Journal of nuclear medicine : official publication, Society of Nuclear Medicine.

[8]  E. Larsen International Conference on Mathematics and Computational Methods Applied to Nuclear Science and Engineering (MC 2011) , 2011 .

[9]  Raphael Grasset,et al.  Python for Prototyping Computer Vision Applications , 2010 .

[10]  W. S. Kiger,et al.  Performance enhancements of MCNP4B, MCNP5, and MCNPX for Monte Carlo Radiotherapy Planning Calculations in Lattice Geomet ries , 2005 .

[11]  Stefano Panzeri,et al.  Python for Information Theoretic Analysis of Neural Data , 2009, Frontiers Neuroinformatics.

[12]  Anthony Skjellum,et al.  Using MPI - portable parallel programming with the message-parsing interface , 1994 .

[13]  R J Procassini,et al.  Mercury + VisIt: Integration of a Real-Time Graphical Analysis Capability into a Monte Carlo Transport Code , 2009 .

[14]  Bartek Wilczynski,et al.  Biopython: freely available Python tools for computational molecular biology and bioinformatics , 2009, Bioinform..

[15]  B. L. Kirk Overview of Monte Carlo radiation transport codes , 2010 .

[16]  A. C. Calleja Scripting a large Fortran code with Python , 2004, ICSE 2004.

[17]  Vlachoudis FLAIR: A POWERFUL BUT USER FRIENDLY GRAPHICAL INTERFACE FOR FLUKA , 2009 .

[18]  Guido van Rossum,et al.  Python/C Api Manual - Python 3 , 2009 .

[19]  R J Procassini,et al.  Load Balancing of Parallel Monte Carlo Transport Calculations , 2004 .

[20]  David M. Beazley,et al.  SWIG: An Easy to Use Tool for Integrating Scripting Languages with C and C++ , 1996, Tcl/Tk Workshop.

[21]  New Features of the Mercury Monte Carlo Particle Transport Code , 2010, ICS 2010.

[22]  M F Sanner,et al.  Python: a programming language for software integration and development. , 1999, Journal of molecular graphics & modelling.

[23]  Anthony Skjellum,et al.  Portable Parallel Programming with the Message-Passing Interface , 1996 .

[24]  R J Procassini,et al.  FZ2MC: A Tool for Monte Carlo Transport Code Geometry Manipulation , 2009 .