A Package for Multi-Dimensional Monte Carlo Integration on Multi-GPUs

21 Feb 2019  ·  Hong-zhong Wu, Junjie Zhang, Long-gang Pang, Qun Wang ·

We have developed a Python package ZMCintegral for multi-dimensional Monte Carlo integration on multiple Graphics Processing Units(GPUs). The package employs a stratified sampling and heuristic tree search algorithm. We have built two versions of this package: one with Tensorflow and another with Numba, both support general user defined functions with a user-friendly interface. We have demonstrated that Tensorflow and Numba help inexperienced scientific researchers to parallelize their programs on multiple GPUs with little work. The performance of ZMCintegral in terms of precision and speed is compared with that of VEGAS for two typical integrands, a 6-dimensional oscillating function and a 9-dimensional Gaussian function. The results show that the speed of ZMCintegral is much faster than VEGAS at a given precision. The algorithm is scalable since the speed of integration is almost linearly proportional to the number of being used GPUs.

PDF Abstract