Implementation of Monte Carlo Load Balancing Based on Nearest Neighbor Algorithm
-
摘要: 为解决蒙特卡罗程序(蒙卡程序)由于迭代后期导致的粒子负载不均衡,从而引起程序并行效率低下的问题,通过分析不同算法的优劣,在蒙特卡罗计算辅助工具包(MOI)蒙卡程序上采用了最近邻域算法实现了负载均衡技术。通过千万网格算例对其进行测试,算法降低了至少10%计算时间,且随着燃耗加深,计算时间会进一步降低。结果表明:最近邻域算法针对粒子负载不均衡问题具有较好的效果。Abstract: In order to solve the problem of low parallelism caused by particle load imbalance of Monte Carlo program at the end of iteration, this paper analyzes the advantages and disadvantages of different algorithms, and the nearest neighbor algorithm is used on MOI Monte Carlo program to solve load balancing. Finally, we adapt an example of ten million grid to test this algorithm, it reduces the computation time by at least 10%, and as the burnup deepens, the calculation time will decrease even further. The results show that the algorithm is effective for the problem of particle load imbalance.
-
Key words:
- Nearest neighbor algorithm /
- Load imbalance /
- MOI Monte Carlo program /
- Parallel
-
表 1 优化前后各燃耗步计算时间表
Table 1. Computation Time of Burnup Step before and after Optimization
燃耗步 优化前计算
时间/s优化后计算
时间/s提升
比例/%0 9611.681 8643.596 10.1 1 10857.94 9669.66 10.9 2 12921.35 11619.55 10.1 3 15763.13 13902.03 11.8 4 17115.66 14625.63 14.5 5 18554.36 15397.11 17.0 6 19025.4 15788.92 17.0 7 20153.55 16318.93 19.0 8 23028.87 16654.42 27.7 9 22304.29 16871.78 24.4 10 22696.86 16815.64 25.9 11 22645.8 17059.28 24.7 12 22808.73 16987.24 25.5 -
[1] 梁金刚,刘诗文,徐琪,等. 蒙特卡罗中子输运程序的MPI/OpenMP混合并行研究[J]. 原子能科学技术,2013, 47(S2): 654-659. [2] WANG K, LI Z G, SHE D, et al. RMC – A Monte Carlo code for reactor core analysis[J]. Annals of Nuclear Energy, 2015, 82: 121-129. doi: 10.1016/j.anucene.2014.08.048 [3] O’BRIEN M J, BRANTLEY P S, JOY K I. Scalable load balancing for massively parallel distributed Monte Carlo particle transport[C]//Proceedings of International Conference on Mathematics and Computational Methods Applied to Nuclear Science & Engineering. Sun Valley: Lawrence Livermore National Laboratory, 2013. [4] ROMANO P K, FORGET B. Parallel fission bank algorithms in Monte Carlo criticality calculations[J]. Nuclear Science and Engineering, 2012, 170(2): 125-135. doi: 10.13182/NSE10-98