20210323, 17:33  #1 
Aug 2020
167 Posts 
Doing P1 on known composite Mersennes
To get some variation from prime hunting, I want to do factoring of known composites and thought that working on Mersennes would be a good way to do that.
Since the computer won't have a good GPU, TF doesn't make much sense from what I read. ECM is maybe a bit extreme for a newcomer, so P1 seems to be a good choice. How do I best go about it? I know I could just let GIMPS decide what to do, but to me it's much more fun to work as manual as possible. I know also I can use worktodo.txt to request specific types of work and exponents. My questions are (and I hope they aren't stupid, I couldn't find answers to them):
If this is explained somewhere and I missed it, please let me know. Preferrably with a link to the ressource in question. ;) 
20210323, 18:12  #2 
P90 years forever!
Aug 2002
Yeehaw, FL
2^{2}×1,873 Posts 
I'll let others answer your P1 questions.
ECM may be the easier choice. Just get version 30.5 and set your available memory and work preference to ECM. All the B1/B2 choices will be made for you. 
20210323, 18:51  #3  
"Viliam Furík"
Jul 2018
Martin, Slovakia
457 Posts 
Quote:
Quote:
For the purpose of finding Mersenne PRPCFs, I suggest somewhere between 1M and 10M, to be optimal for both P1 time length and the PRPCF test length. Lower ranges are almost useless for P1, as there are mostly nonksmooth factors (hard to find by P1). Quote:
20x and similar are the ratios B2/B1, this will be automatically chosen by Prime95. I don't think it takes previous work into account. Quote:
I recommend running the benchmark according to the settings in the picture. This will benchmark the 1M to 10M range and should take about 10 minutes in total. When you complete the benchmark, look at your wanted FFT size, and compare the throughput numbers at the ends of the result lines. That one with the highest throughput is the best one. For 10900K, my prediction is, that 10 worker option with 1 core per worker will be best up to about 256K FFT, or about 5M range, and up from there, the 5 workers with 2 cores per worker will be the best option. Quote:
Lastly, I recommend those B1s for a swift but not too weak P1 factoring: 1M range  10,000,000 2M range  5,000,000 3M range  3,000,000 4M range  2,500,000 5M range  2,000,000 10M range  1,000,000 Yes, basically so that the product of B1 * exponent size is about 10,000,000,000,000. Try it out, and if you decide you want it faster or slower, change it accordingly. Time (equivalent to the amount of work) scales about linearly with the B1 size. 

20210324, 04:21  #4  
Romulan Interpreter
Jun 2011
Thailand
3·47·67 Posts 
Quote:
I usually take 1.5M for B1 at the front, opposite to the ~800k1M recommended, and use a 30x or 50x for B2 according with how fast I want to go through the assignments. Doing a bit more work may turn a larger factor, but this is "personal vanity", not really supported by numbers. The most efficient (factors found to amount of work done) work is said to be when stage 2 takes the same amount of time (wall clock) as stage 1. And this depends on your system. Alternative is to let P95 chose the numbers for you, if you do that in the CPU. Just select "P1" as work type. Last fiddled with by LaurV on 20210324 at 04:24 

20210324, 12:02  #5  
Aug 2020
167 Posts 
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Thanks again, that was really helpful. Quote:
Last fiddled with by bur on 20210324 at 12:06 

20210324, 12:49  #6 
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest
47×109 Posts 
You can quickly get a good idea of what P1 bounds are appropriate, by https://www.mersenne.org/report_expo...3001000&full=1 or similar.
https://www.mersenne.ca/exponent/107500007 is an example where P1 bounds were not adequate, and TF was a bit deeper than usual, so overall the probability of finding a factor is close to what it should be, although a little less efficiently reached. I would use the GPU72 row's TF depth and P1 bounds on https://www.mersenne.ca/exponent/108500057. It's more efficient to go for the full bounds that will retire the P1 need the first time. See https://www.mersenneforum.org/showpo...9&postcount=30 and https://www.mersenneforum.org/showpo...9&postcount=20 On mprime/prime95, give it enough allowed memory usage to be efficient and reach suitable bounds, but not so much that the console response is slow or virtual memory is thrashing, madly paging out to disk. GBs not MBs for wavefront P1. Last fiddled with by kriesel on 20210324 at 12:54 
20210324, 13:07  #7  
"Viliam Furík"
Jul 2018
Martin, Slovakia
457 Posts 
Quote:
Some of them would, but ECM is probabilistic, in that it has only a certain probability of finding a factor with a given size, whereas P1 (if done without computation errors, of course) will find it for sure if the bounds are high enough and there is a factor to be found. You don't have to worry much about it, just run the P1 with a higher B1 size. You're welcome. In that case, you can either increase the bound to some reasonable extent, balanced with the amount of work needed to be done. E.g. if I find an exponent in the 9M range with 1,000,000 P1 done, I could either make it say 2,000,000 or just leave it and throw the same amount of work on other exponents. From a certain size up, for specific hardware, there is always a value above which you will just waste time waiting for it to complete. If you set it to be 1,000,000,000 for a 9M exponent, it is useful for a single specific exponent, but it's an inefficient waste of resources for mass factoring. 

20210326, 20:26  #8 
Aug 2020
167 Posts 
So for https://www.mersenne.ca/exponent/107500007, if I was determined to find a factor via P1, which value for B1 would I use? Just increase it to 2,000,000?
Or as a more extreme example: https://www.mersenne.ca/exponent/200087 would I go with B1=100,000,000? While for https://www.mersenne.ca/exponent/108500057 where no P1 was ever done, I would just go with the 24,000,000 that GPU72 suggests? To use an example, if I was to work on https://www.mersenne.ca/exponent/100003 and wanted to find another factor with 25% probability, I was told by https://www.mersenne.ca/prob.php?exp...ob=25&work=200 to use B1=17,164,935,784 and the following line worktodo.txt would make prime95 ask it to be assigned: Code:
Pminus1=1,2,100003,1,17164935784,2059792294080,67 (from the calculator) Pminus1=1,2,100003,1,2600000000,2600000000,67,"6400193,1113838336566049330755578765857" (from morefactors.php) And is that 25% probability including the fact that 2 factors were already found, does it even matter? And how do I know if ECM would make more sense? 413 GHz days would be about 12 days on that i9? Another example https://www.mersenne.ca/exponent/200087, the calculator suggested B1=76131. But I know it was done to 50,000,000. So I force it to B1=100,000,000? For B2=3,000,000,000 it calculated 50% odds in 3 GHz days, which sounds like a nice first task. Last fiddled with by bur on 20210326 at 20:35 
20210327, 00:44  #9 
Sep 2008
Kansas
110011111111_{2} Posts 
One thing that might need to be pointed out is the P1 method is not accrual. If you run P1 using B1=1M on an exponent and then run P1 again using B1=5M you are essentially rerunning the 1M computations again along with the 15M range, unless you use a save file. Since this is posted in factoring thread instead of PrimeNet I’m not sure how all this works with Mersenne numbers. Others, feel free to correct my understanding. So, the most bang for the buck is to pick a B1 that your RAM can handle and not to consider incremental work.

20210327, 02:33  #10 
Jun 2003
2·3·827 Posts 
Your calculations are
You have to account for all the prior factorization work done, chief among them being ECM. Check here 100003 has had approximately 20% of t35 done, so you can assume no factors less than 30 digits. In the calculator, you should say how much preTF is done. 10^30 is about 2^100. Unfortunately, the calculator only goes up to 85. But give at least that and you'll see more realistic numbers. Same for 200087 EDIT: Some better numbers. If you're willing to spend about 4000 GHzDays, you can get about 5% probability (closer to 4% practically) for 100003. Subtract prior from new Last fiddled with by axn on 20210327 at 02:43 
20210327, 18:24  #11 
Aug 2020
167 Posts 
Thanks, that's both good to know.
Now some technical questions, I added the lines to worktodo.txt and Prime95 startet work, but it apparently wasn't contacting primenet to get an ID. It didn't show up in my assignments at least. If the work was already assigned, shouldn't I see a status message? I tried the manual assigment form, but it said "No assignment available meeting CPU, program code and work preference requirements". I couldn't find any info about this error message. I thought only LLR/PRP on large exponents was limited to trusted computers? Additionally, to prevent prime95 from requesting new assigments, is adding NoMoreWork=1 to worktodo.txt the best way? Last fiddled with by bur on 20210327 at 18:25 
Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
The spread of low k´s (1 up to 13) of Mersennes  Kalli Hofmann  Probability & Probabilistic Number Theory  2  20200913 13:39 
Possible obfuscation for Mersennes  paulunderwood  Miscellaneous Math  3  20190124 03:14 
Composite integers n satisfying prime exponents of Mersennes  carpetpool  carpetpool  7  20170105 04:36 
Betting on Mersennes  update #1  CRGreathouse  Lounge  10  20160331 13:41 
Stars and Mersennes  David John Hill Jr  Science & Technology  2  20091213 09:47 