• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

Computer Engineering & Science ›› 2021, Vol. 43 ›› Issue (04): 634-640.

Previous Articles     Next Articles

RMC based performance optimization of Monte Carlo program

XU Hai-kun1,KUANG Deng-hui1,LIU Jie1,2,GONG Chun-ye1,2#br#

#br#
  

  1. (1.Science and Technology on Parallel and Distributed Processing Laboratory,

    National University of Defense Technology,Changsha 410073;

    2.Laboratory of Software Engineering for Complex Systems,
    National University of Defense Technology,Changsha 410073,China)

  • Received:2020-06-11 Revised:2020-07-23 Accepted:2021-04-25 Online:2021-04-25 Published:2021-04-21

Abstract: Monte Carlo method (Monte Carlo, MC) is an important particle transport simulation method in nuclear reactor design and analysis. The MC method can simulate complex geometric shapes and the calculation results have high accuracy. The disadvantage is that it takes a lot of time to simulate hundreds of millions of particles to obtain accurate results. How to improve the performance of the Monte Carlo program has become a challenge for large-scale Monte Carlo numerical simulation. Based on the heap MC analysis program RMC, this paper has successively carried out a series of optimization methods such as dynamic memory allocation optimization based on TCMalloc, OpenMP thread scheduling strategy optimization, and vector memory alignment optimization, and parallel I/O optimization based on HDF5. Under the example of calculating 2 million particles, the overall program performance is improved by more than 26.45%.

Key words: Monte Carlo method, performance optimization, memory management, parallel I/O