APP下载

基于MIC的MRG32k3a并行化设计与实现

2016-03-17宋博文周津羽周晓辉

计算机应用与软件 2016年2期

宋博文 周津羽 华 诚 刘 逍, 周晓辉,

1(西安邮电大学计算机学院 陕西 西安 710121)

2(陕西省高性能计算研究中心 陕西 西安 710121)



基于MIC的MRG32k3a并行化设计与实现

宋博文1周津羽2华诚2刘逍1,2周晓辉1,2

1(西安邮电大学计算机学院陕西 西安 710121)

2(陕西省高性能计算研究中心陕西 西安 710121)

摘要随机数产生器在工程模拟等领域获得广泛应用,MRG32k3a是一种性能优异的随机数产生器,但产生速率较慢。针对这种情况,在研究MRG32k3a串行算法的基础上,利用算法并行化理论,提出一种基于MIC(Many Integrated Core)平台的MRG32k3a并行化方法。实验结果表明,该方法能通过TestU01的全部测试,移植到MIC平台后加速比与线程数呈线性增长关系,相对CPU单线程的最佳加速比为17.73。

关键词随机数产生器MIC并行化MRG32k3aTestU01

DESIGN AND IMPLEMENTATION OF MRG32K3A PARALLELISATION BASED ON MIC

Song Bowen1Zhou Jinyu2Hua Cheng2Liu Xiao1,2Zhou Xiaohui1,2

1(School of Computer Science and Technology,Xi’an University of Posts and Telecommunications,Xi’an 710121,Shaanxi,China)2(Shaanxi Research Center for High Performance Computing,Xi’an 710121,Shaanxi,China)

AbstractRandom number generator is widely used in engineering simulation, MRG32k3a is a random number generator with excellent performance, but its generation rate is slow. In view of this, this article presents an MIC platform-based MRG32k3a parallelisation approach using the theory of algorithm parallelisation according to the study on MRG32k3a serial algorithm. Experimental results show that the approach can pass all the tests of uniform random number test-library TestU01. After transplanting to MIC platform, the relationship of the speedup ratio and the number of threads increases linearly, and the best speedup ratio relative to CPU single-thread reaches 17.73.

KeywordsRandom number generatorMany integrated core (MIC)ParallelisationMRG32k3aTestU01

0引言

随机数产生器是用来产生随机数的装置[1],一般分为真随机数产生器和伪随机数产生器。真随机数通过物理实验或自然噪音等方式产生,成本高;伪随机数通过若干种子利用数学算法递推产生周期性的随机数序列,不需要外部物理硬件的支持,并且具有类似于真随机数的统计特征;因此,在科学研究和工程模拟领域主要应用伪随机数产生器。相对于现在普遍应用的伪随机数产生器LCG(Linear Congruential Generator)[2],MRG32k3a[3-5]具有长周期、随机数序列质量优异的特点,但较慢地产生速率制约了它的应用。

随着计算机系统结构和计算机网络技术的快速发展,科学研究和工程模拟对随机数产生器的性能及速率要求也日益增长,研究随机数产生器并行化是迫切的、必然的。……

登录APP查看全文