|
发表于 2008-11-10 15:05:48
|
显示全部楼层
我的程序正在针对 给定的大偶数n( > 10^15), 计算n表示为两素数和对数的个数.
这个正好国外没有人算过, 程序目前是基于控制台的, 好处就是一开始运行就
总共需要的计算时间和计算进度. 对cpu要求L2 >= 2M 否则性能会下降非常
厉害 因为cache miss 比例非常高.
下面是部分截屏
calcaute PI_6(10^16) with pattern [p, p + 4, p + 6, p + 10, p + 12, p + 16]
this is just for benchmark, only set COUNT_TABLE can generate detail table
step 0 : working thread = 3, L2 cache use 89.06%
BLOCKSZIE = 2 * 3 * 5 * 7 * 11 * 13 * 17 * 19 * 23 * 3 = 669278610
SEGENT_MOD = 0
Pattern memory use = 928317, need min Pattern memory = 255255
total memory use is about 36.3162 M
segmented sieve cache size = 315 k
step 1 : sieve Prime n = 100000000
Prime[5761455] = 99999989
sieve prime time use 242.58 ms
step 2 : sieve Pattern n = 223092870
pattern[85085] = 669278497, total patterns = 255255
total sieve percent = 0.22883%
sieve patterns time use 9.95 ms
step 3 : sieve small tuplet n = 669278616
ktuplets = 249
sieve tuplets time use 941.54 ms
setp 4 : init Startp time use 3544.73 ms
init all paramter time use 4741.87 ms
step 5 : start to sieve each pattern, be careful with the total time output
be patient wait for calculating ......
thread 1: total finishing ... 0.0063%, total time ~= 57.918 hours, all 6-tuplets
~= 85765680
thread 1: total finishing ... 0.0125%, total time ~= 53.185 hours, all 6-tuplets
~= 84489405 |
|