![]() |
![]() |
#1 |
"Cas Wegkamp"
Sep 2013
The Netherlands
22 Posts |
![]()
So I have been looking through the helpfile and basically been scouring the internet for this but I can't seem to find an answer. Why doesn't Prime95 use base files?
I expected that it would generate files to continue working to save CPU time. So for example every 1.000.000 iterations make a file that a future computation can use to start from. As an example: my current assignment is M64803829, my previous assignment was M65999761. Now since 2^50.000.000 will always have the exact same result, you'd expect that the program will save such a file as it is computationally huge but storage-wise not actually that big (~20MB uncompressed). To make my point on it not being that big: my current computer has 1Tbyte of disk space on the regular HDD and another 250GB on my SSD and as such: disk space is not an issue and surely other people who participate in this project have comparable disk sizes or even bigger. But it doesn't seem to make launch points. Am I missing a setting to allow that because that does make a whole lot more sense to me as it will save you millions of iterations and therefor a lot of time. |
![]() |
![]() |
![]() |
#2 |
"Oliver"
Mar 2005
Germany
21328 Posts |
![]()
Reading 2^50.000.000 from disk would take much longer than just creating this in memory, in binary it is a one followed by 50.000.000 zeros.
The LL algorithm does Sn+1 = (Sn2-2) mod 2exp-1. S0 = 4, calculate Sexp-2 now. If you remove the modular part (which is different for each mersenne number) and ignore the -2 than we have 22[SUP]50.000.000[/SUP] which is much, much, much more than 1TB (an still easier to create since it is just an other power of two). The final modular division would take much, much, much longer compared to the ways GIMPS (LL test) works. Oliver |
![]() |
![]() |
![]() |
#3 |
May 2013
East. Always East.
11×157 Posts |
![]()
The algorithm starts with four. You square it and then subtract two. That's one iteration, and you do two less iterations than the number of exponents (i.e. P-2 iterations). The modulo function is added because that number is getting square over and over again. By taking the modulus of MP you're keeping the entirety of the calculation to less than 2P bits. Every time you square the number, you double the number of bits. You start with a four bit number, then eight, then sixteen, so as Oliver said, you WOULD end up with a number that is MP bits. Remember MP is over 20,000,000 digits long in some of the tests we're currently working on. A Terabyte is a twelve digit long number of bits.
You're absolutely correct about the theoretical possibility of not repeating our work. If we didn't need to do the modulus thing (it's entirely for the sake of faster computations (also storage capacity); it is not necessary to the algorithm in a mathematical sense), we could do one big modulo calculation every time we pass by a candidate exponent and save ourselves the trouble of climbing all the way back up every time, but it's just not possible. You would have to save 260,000,000 bits and there are about 2240 electrons in the known universe. Last fiddled with by TheMawn on 2013-09-29 at 20:43 Reason: Forgot to finish a sentence. |
![]() |
![]() |
![]() |
#4 |
"Brian"
Jul 2007
The Netherlands
2·11·149 Posts |
![]()
And in case TheJudger's and TheMawn's explanations still leave any confusion about what's going on, it's beautifully explained here:
http://www.mersennewiki.org/index.ph...le_Explanation |
![]() |
![]() |
![]() |
#5 |
"Gang aft agley"
Sep 2002
2×1,877 Posts |
![]() |
![]() |
![]() |
![]() |
#6 |
May 2013
East. Always East.
11×157 Posts |
![]() |
![]() |
![]() |
![]() |
#7 |
"Gang aft agley"
Sep 2002
72528 Posts |
![]()
True - pedantic of me and not a clear distinction. Also if you store an iteration on disk, you need the P bits plus lg P bits to store an iteration count, so again more than P. So either accounting for the 2P bits that exist briefly after squaring, or the lg P bits to keep an iteration count, P bits alone is not sufficient.
|
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Prime95 - hours per day question | Przem | Information & Answers | 3 | 2015-10-06 15:16 |
prime95 software question | crash893 | Software | 8 | 2010-12-12 22:31 |
Prime95 benchmark question | Builder | Information & Answers | 2 | 2009-10-25 20:43 |
Question about Prime95 24.12 Problem??? | VJS | Software | 8 | 2005-06-24 18:23 |
Simple question on Prime95 | xtreme2k | Software | 4 | 2003-04-02 08:35 |