mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2013-09-29, 15:41   #1
Warlord
 
"Cas Wegkamp"
Sep 2013
The Netherlands

22 Posts
Default Question about Prime95

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.
Warlord is offline   Reply With Quote
Old 2013-09-29, 16:52   #2
TheJudger
 
TheJudger's Avatar
 
"Oliver"
Mar 2005
Germany

21328 Posts
Default

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
TheJudger is offline   Reply With Quote
Old 2013-09-29, 20:41   #3
TheMawn
 
TheMawn's Avatar
 
May 2013
East. Always East.

11×157 Posts
Default

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.
TheMawn is offline   Reply With Quote
Old 2013-09-29, 20:56   #4
Brian-E
 
Brian-E's Avatar
 
"Brian"
Jul 2007
The Netherlands

2·11·149 Posts
Default

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
Brian-E is offline   Reply With Quote
Old 2013-09-29, 21:28   #5
only_human
 
only_human's Avatar
 
"Gang aft agley"
Sep 2002

2×1,877 Posts
Default

Quote:
Originally Posted by TheMawn View Post
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.
P bits.
only_human is offline   Reply With Quote
Old 2013-09-29, 23:58   #6
TheMawn
 
TheMawn's Avatar
 
May 2013
East. Always East.

11×157 Posts
Default

Quote:
Originally Posted by only_human View Post
P bits.
We could argue on the technicalities, because you might have MP-1 leftover after the Modulo and then you go and square it after that. Hence "less than" 2P bits. But yes, after the modulo there are always P or less bits.
TheMawn is offline   Reply With Quote
Old 2013-09-30, 00:17   #7
only_human
 
only_human's Avatar
 
"Gang aft agley"
Sep 2002

72528 Posts
Default

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.
only_human is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
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

All times are UTC. The time now is 02:25.


Wed Feb 1 02:25:02 UTC 2023 up 166 days, 23:53, 0 users, load averages: 1.12, 1.06, 0.97

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔