mersenneforum.org  

Go Back   mersenneforum.org > New To GIMPS? Start Here! > Information & Answers

Reply
 
Thread Tools
Old 2019-08-01, 02:32   #1
JuanTutors
 
JuanTutors's Avatar
 
Mar 2004

7758 Posts
Default Question on how to read worktodo

Hi all! I'm trying to interpret the description of the PRP section of the worktodo, but ran into a question I couldn't answer and asked someone who wasn't sure either.

Here is the PRP description from the readme:
Code:
The PRP choice, available from the menus only in the Mac OS X version, lets you do a
probable prime test on numbers of the form k*b^n+c.  On all OSes, you can edit
the worktodo.txt file directly.  For example add:
	PRP=k,b,n,c[,how_far_factored,tests_saved][,prp_base,residue_type][,"comma-separated-list-of-known-factors"]
where the how_far_factored and tests_saved values are used to pick
optimal bounds for P-1 factoring prior to running the PRP test.
So here are my worktodo entries from my file and from my account online:

Code:
PRP=HEX,1,2,332XXXXXX,-1,77,2  //from my worktodo.txt file
PRP=HEX,1,2,332XXXXXX,-1,79,0,3,  //from my account online. Shout-outs to ATH!!
I understand that the 1,2,332XXXXXX,-1,79 means "M332XXXXXXX has been prefactored to 2^79" or "to 2^77" in the first line. But I'm having trouble interpreting the "2" and "0" on the first and second line. I am pretty sure I know what the last "3" means at the end.

UNRELATED NOTE: It says PRP is only available in the Mac OS X version. That's a typo, I assume?
JuanTutors is offline   Reply With Quote
Old 2019-08-01, 03:11   #2
hansl
 
hansl's Avatar
 
Apr 2019

110011012 Posts
Default

Hi, check this reference post:
https://www.mersenneforum.org/showpo...8&postcount=22

Looks like that column would be "tests_saved", which is also explained in more detail in the same post.
hansl is offline   Reply With Quote
Old 2019-08-01, 04:14   #3
JuanTutors
 
JuanTutors's Avatar
 
Mar 2004

7758 Posts
Default

Quote:
Originally Posted by hansl View Post
Hi, check this reference post:
https://www.mersenneforum.org/showpo...8&postcount=22

Looks like that column would be "tests_saved", which is also explained in more detail in the same post.
Ah, I think I understand. So are those "2" and "0' a number that I choose on my own? And if so, doesn't the online system prefer something bigger than 0 tests saved? Just basing myself on what I think you're saying, that the 2 means trying to save 2 primality tests, then why does the online system have a 0?

Last fiddled with by JuanTutors on 2019-08-01 at 04:14
JuanTutors is offline   Reply With Quote
Old 2019-08-01, 06:13   #4
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

5·1,877 Posts
Default

The "tests saved" basically tells to TF and P-1 if that is a first-time LL/PRP test or a double-check, so a value other than 1 or 2 makes no sense, unless you do P-1 "for a living" hehe. Basically, if you find a factor (by TF or P-1, in this case) before any LL/PRP is done, you save two tests (the first time test and the double check test), and if you find a factor after LL/PRP first time test is done, you save one test, the DC test.

Now, if you save more tests, like 50 days of work, instead of less tests, like 25 days of work only, it worth doing some more TF or P-1. Because if you find a factor, you save 50 days of (yours or someone else's) work, then you can afford doing 2-3 days P-1, for example, but if you only save 25 days, better do only one day of P-1. You got the idea. This information (tests saved) is used mainly by P-1 when selects the bounds, i.e. you go with 3-4% chances to find a factor (and work one day to save 25) or with 5-6% (and work 2 days to save 50). Or waste your time, if unlucky, hehe.

In the past, the "tests saved" was also used to select the bitlevel, when you do TF. Doing TF for first test was one additional bitlevel compared with doing TF after first test, and before DC (because you save 2 tests, instead of 1, and the amount of TF work doubles with each bitlevel, see the graphs from this page, the red and orange lines, for more explanation). But now nobody is doing TF with the CPU, since the GPUs are hundred of times faster for TF.

So, from the POV of doing LL/PRP, those parameters are not relevant. Now, some people like to find factors and will TF/PM1 exponents for which both FT and DC was done (i.e.mersenne numbers we know they are not prime, but we don't know their factors). Doing that, you save no tests, and such activity is not useful for GIMPS, whose main goal is finding primes. But hey, finding factors is cute

From the same reason, some guys will do P-1 "forever", what we jokingly call "for a living", they pick an exponent and increase those boundaries until they find that record factor, or they get bored and move to another exponent.

When prime95 choose the bounds for the P-1, it will consider how many tests are saved, but it has no idea that the number can only be 1 or 2. So, if you want to do less P-1, or more P-1, you can modify this value. For P95, that is just a number used in the formula for B1 and B2, and and if you put there 5 or 7, P95 will think that you "save a lot of tests" (even if this is just a figure of speech, in the best case, statistically, you can only save about 2.03 test, the decimals come from the percent of tests returning errors, for which we need to do triple and quadruple checks) and will use higher B1/B2, increasing your chance to find that record factor (and wasting your more time into the test). We do not remember the largest value you can use, it is either 5 or 9, after which there is no visible effect in B1 or B2, but we remember it was a single digit value, in the past when we were doing tons of P-1, we used to edit these values by hand before putting them in the worktodo, but since the GPU era, we don't do much P-1 with the CPU.

Last fiddled with by LaurV on 2019-08-01 at 06:44
LaurV is offline   Reply With Quote
Old 2019-08-01, 14:30   #5
JuanTutors
 
JuanTutors's Avatar
 
Mar 2004

1111111012 Posts
Default

@laurv so that 2 after the -1 means, "Computer, do enough P-1 factoring to save 2 tests worth of work statistically"?
JuanTutors is offline   Reply With Quote
Old 2019-08-01, 16:01   #6
JuanTutors
 
JuanTutors's Avatar
 
Mar 2004

509 Posts
Default

Also I'm still not clear why the worktodo file I got automatically has a 2 but the online one has a 0.
JuanTutors is offline   Reply With Quote
Old 2019-08-01, 16:45   #7
kriesel
 
kriesel's Avatar
 
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest

5×19×53 Posts
Default

Quote:
Originally Posted by JuanTutors View Post
@laurv so that 2 after the -1 means, "Computer, do enough P-1 factoring to save 2 tests worth of work statistically"?
Almost got it.
Computer, evaluate many combinations of P-1 bounds and pick the combination that looks to promise the greatest savings of overall computing effort, statistically, given time to run P-1, time to run primality tests, and probabilities of finding factors as a function of those bounds, saving tests_saved=2 primality tests per factored Mersenne number.

Minimize the function, something like, in the usual sequence of events,

Sum_probable_effort = (TF effort as function i(exponent,bitlevel,etc) +
(probability of no TF factor found as j(exponent,bitlevel,etc)) * [ (P-1 factoring effort as g(B1,B2,exponent,etc)) + (probability of no P-1 factor found as f(B1,B2,exponent,etc)) * tests_saved * (effort per primality test as h(exponent,etc)) ]

If the sequence differs, the function to be minimized differs.

In reality, tests_saved is a fraction more than 1 or 2 due to error rates, and none of the effort functions are tidy explicit formulas. TF effort is approximately proportional to 2bitlevel/exponent, primality testing is approximately proportional to exponent2.1, P-1 optimized bounds tend to approximately track the order of primality testing. See https://www.mersenneforum.org/showpo...27&postcount=2, particularly page 6 of the attachment. The vertical space between the two fits there is probable computing effort saved by P-1.
An important caveat to that savings is if the bounds used are not adequate to retire the P-1 task for the exponent in the ~97% probability no-P-1-factor-found case (such as the bounds were constrained by limited RAM), someone may need to run another, and that increases total P-1 cost. Inadequate P-1 bounds are to be avoided, in my opinion.

Last fiddled with by kriesel on 2019-08-01 at 16:55
kriesel is online now   Reply With Quote
Old 2019-08-01, 16:54   #8
hansl
 
hansl's Avatar
 
Apr 2019

20510 Posts
Default

To just directly quote the reference post this time:
Quote:
Originally Posted by kriesel View Post
tests_saved = integer number of future primality tests saved if a factor is found, usually 2 for a first test candidate, 1 for a double-check candidate, 0 if a sufficient P-1 has already been completed, or optionally up to 9 for aggressive P-1 factoring
So the 0 means that a bunch of P-1 was presumably already done on that exponent.

If you are only looking at PRP lines, I think it would just be extra information and shouldn't affect how the PRP job itself is done.

Also you can look at the history of your specific exponents and see exactly what work has been done if you are curious:
https://www.mersenne.org/M332XXXXXX

Last fiddled with by hansl on 2019-08-01 at 16:56
hansl is offline   Reply With Quote
Old 2019-08-01, 16:59   #9
JuanTutors
 
JuanTutors's Avatar
 
Mar 2004

7758 Posts
Default

Cool, thanks for the explanation. I think I'll leave the "2" instead of the "0" for a slightly larger chance of finding a factor, just for my personal preference. I think I get why some people put that number all the way up to "9", but I'm not about that life 😂
JuanTutors is offline   Reply With Quote
Old 2019-08-01, 17:07   #10
kriesel
 
kriesel's Avatar
 
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest

5·19·53 Posts
Default

Quote:
Originally Posted by hansl View Post
Also you can look at the history of your specific exponents and see exactly what work has been done if you are curious:
https://www.mersenne.org/M332XXXXXX
Clicking through to the mersenne.ca page for the exponent can be very helpful. It shows target TF and P-1 bounds and current status and GhzDays effort. For example, one I have under way,

https://www.mersenne.org/report_expo...exp_hi=&full=1
click the exponent value under Mn, goes to
https://www.mersenne.ca/exponent/332419523

GPU72 TF level + GPU72 B1 and B2 exceeded, good enough.
Final TF levels, P-1, and PRP all are being done on a gpu, so the gpu targets apply.
I go by the GPU72 line for gpu work and primenet line for cpu work.

Last fiddled with by kriesel on 2019-08-01 at 17:07
kriesel is online now   Reply With Quote
Old 2019-08-01, 17:07   #11
JuanTutors
 
JuanTutors's Avatar
 
Mar 2004

509 Posts
Default

Quote:
Originally Posted by hansl View Post
To just directly quote the reference post this time:

So the 0 means that a bunch of P-1 was presumably already done on that exponent.

If you are only looking at PRP lines, I think it would just be extra information and shouldn't affect how the PRP job itself is done.

Also you can look at the history of your specific exponents and see exactly what work has been done if you are curious:
https://www.mersenne.org/M332XXXXXX
Whelp, now I'm back to a bit confused. I was given the assignment automatically through Prime95 with a 2 in my worktodo, but my online account under mersenne.org/workload has a 0. Which one do I go buy, if Prime95 gave it to me with a 2?

(If it's a bug in the system, perhaps it's because I read somewhere that Prime95 does P-1 factoring before a second round of factoring for 100M digit mersennes?)
JuanTutors is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
PLEASE READ BEFORE POSTING! ewmayer Information & Answers 1 2019-04-05 03:13
How I read ECM lukerichards Lounge 2 2019-03-18 11:16
I am sorry please read this meeztamike Miscellaneous Math 3 2006-01-03 01:47
chance of finding a factor?......Read me read me read me :) Firedog18 Software 9 2003-07-25 17:10
Please read!!!!! andi314 Lone Mersenne Hunters 1 2003-02-20 13:53

All times are UTC. The time now is 21:41.

Wed Apr 21 21:41:19 UTC 2021 up 13 days, 16:22, 0 users, load averages: 2.60, 2.21, 1.96

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, 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.