mersenneforum.org (https://www.mersenneforum.org/index.php)
-   -   What determine if P-1 factoring is used? (https://www.mersenneforum.org/showthread.php?t=26849)

 drkirkby 2021-05-29 18:41

What determine if P-1 factoring is used?

I wanted to check the RAM usage during P-1 factoring, so manually reserved an exponent, for a [B]PRP test.[/B] The exponent has no P-1 factoring.

[URL]https://www.mersenne.org/report_exponent/?exp_lo=108792767&full=1[/URL]

I assumed that when I run the exponent using mprime 30.6b4, using the line given by the server

[CODE]PRP=xxx,1,2,108792767,-1,76,0,3,1[/CODE]that mprime would attempt P-1 factoring, to look for a factor, to possibly save time performing a computationally expensive PRP test.

I then changed the line in worktodo.txt, to remove the 3,1 on the end,
[CODE]PRP=xxx,1,2,108792767,-1,76,0[/CODE]deleted all the files related to the exponent, and started again. I thought that would force a P-1 test, but it did not.

I'm a bit puzzled why mprime goes straight into a computationally expensive PRP test, before giving a chance to a P-1 test to find a factor.

Yes, I am aware I could have reserved P-1 factoring, rather than a PRP test, but I'd rather make use of the P-1 results, and assumed that since a P-1 factoring had not been done, one would be done before starting the PRP test. I obviously have some basic misunderstanding here.

Dave

 drkirkby 2021-05-29 18:50

I see changing the line in worktodo.txt to
[CODE]
PRP=(aid redacted),1,2,108792767,-1,76,2[/CODE]forces a P-1 test, Then mprime reports
[CODE][Worker #2 May 29 19:44] Optimal P-1 factoring of M108792767 using up to 376832MB of memory.
[Worker #2 May 29 19:44] Assuming no factors below 2^76 and 2 primality tests saved if a factor is found.
[Worker #2 May 29 19:44] Optimal bounds are B1=928000, B2=55053000
[Worker #2 May 29 19:44] Chance of finding a factor is an estimated 4.73%[/CODE]I'm just puzzled why this does not occur as a matter of course. It's only been trial factored to 2^76.

 kriesel 2021-05-29 18:56

Because for some reason the server incorrectly gave an assignment with <tests_saved>=0 that time.
Which tells the client software mprime there is no point to attempting P-1, don't bother.
You can fix that by changing the 76,0 to 76,1 or 76,2.
Or constructing a suitable Pminus1 entry preceding the PRP entry, stopping and restarting.
As usual [URL="https://www.mersenneforum.org/showpost.php?p=522098&postcount=22"]reference info[/URL]!
Not sure why the server seems to have gotten that one wrong. Usually it has worked.

 drkirkby 2021-05-29 19:08

[QUOTE=kriesel;579422]Not sure why the server seems to have gotten that one wrong.[/QUOTE]
I'm glad to see I am not the only one that thought it was wrong! Perhaps because I specifically requested PRP, although I'm a bit surprised.

I reserved 16 exponents for PRP tests, and every one was of the form
[CODE]PRP=xxx,1,2,exponent,-1,76,[B]0,3,1[/B][/CODE]Thank you for editing the post where I left the assignment ID. I realised I'd screwed up, and was about to edit it, but see you beat me to it.

Dave

 Happy5214 2021-06-04 23:22

[QUOTE=drkirkby;579421][CODE]PRP=(aid redacted),1,2,108792767,-1,76,2[/CODE][/QUOTE]

If you're doing a PRP with proof, wouldn't you only save ~1 test (not 2) by finding a P-1 factor, since the certification time pales in comparison to the first test?

 LaurV 2021-06-05 11:54

Yes, when referring to P95-given assignments, that is remnant from old LL age. Nowadays you only save one test and the cert time (which is about a fifth of a test, or less, depending on the power you use in generating the cert).

However, there is nothing wrong with using 2, for example, with manual P-1 assignments, people (me included) use to artificially raise the number to 3, 5, etc (i.e. manually editing it), to cheat P-1 bounds calculation into using a larger B1 (and if you have memory, B2 too). This way you will spend a little bit more time doing P-1, but increase your chances of finding a larger factor. This is better than using a "hard" larger B1 (specified in command line or in worktodo file for gpuOwl, for example), because in this case the bound is "flexible", it depends on the exponent, it is not fixed.

 kriesel 2021-06-05 12:22

[QUOTE=LaurV;580007]cert time (which is about a fifth of a test, or less, depending on the power you use in generating the cert[/QUOTE]Normally FAR less than a fifth; generally under 1%. For example, Gpuowl v6.11-380's default proof power is 8, which takes overall effort for proof generation, server processing, and verification (CERT) of 0.41% of a primality test. Content there IIRC re proof costs is a reviewed summary of statements made by Prime95 and Preda. [URL]https://www.mersenneforum.org/showpost.php?p=523345&postcount=4[/URL] So: relative to cost of a single primality test, LL & LLDC without error, 2; LL & LLDC with usual error rates at p~104M ~2.04 tests equivalent; PRP & PRPDC without proof, ~2.00; PRP & proof, 1.0041 for power 8. Note the proof cost for power 9 is about the same as the 0.2-0.3% cost of GEC or Jacobi checks.

 drkirkby 2021-06-05 13:01

[QUOTE=LaurV;580007]However, there is nothing wrong with using 2, for example, with manual P-1 assignments, people (me included) use to artificially raise the number to 3, 5, etc (i.e. manually editing it), to cheat P-1 bounds calculation into using a larger B1 (and if you have memory, B2 too). This way you will spend a little bit more time doing P-1, but increase your chances of finding a larger factor. This is better than using a "hard" larger B1 (specified in command line or in worktodo file for gpuOwl, for example), because in this case the bound is "flexible", it depends on the exponent, it is not fixed.[/QUOTE]
What's your reason for wanting to find a large factor? I can think of three possible reasons.
a) You like hunting for factors. I know many people do, as they have a better success rate than those looking for just Mersenne primes.
b) To reduce the probability of you needing to run the more computationally expensive PRP test.
c) A reason I can't think of.

If your [B]only [/B]interest is finding Mersenne Prime numbers, then is it not counterproductive to run a larger range of B1 and B2? It would seem from

[URL]https://www.mersenne.org/various/math.php#p-1_factoring[/URL]
that the optimal values of B1 and B2 are worked out, based on maximising the equation
[CODE]chance_of_finding_factor * primality_test_cost - factoring_cost[/CODE]

 LaurV 2021-06-06 13:38

Our motivations vary.

Our force, as a group, stays in the fact that we are different.

 Siegmund 2021-07-22 00:57

I had just peeked in to ask whether P-1 factoring bounds were being set higher than they should be... I noticed today that a recent PRP assignment was doing P-1 on the basis of saving two tests rather than one... and am happy to see that there was already a thread about it, and there's an easy way I might manually change an assignment to tell it it saves only 1 test.

It does seem like the default ought to be 2 for LL testers and only 1 for PRP testers.

 chalsall 2021-07-22 01:15

[QUOTE=Siegmund;583723]It does seem like the default ought to be 2 for LL testers and only 1 for PRP testers.[/QUOTE]

You are not incorrect.

But, some of the ones doing P-1 (or even P+1) simply like to find factors.

Let them work.

Others will come behind to clean up.

All times are UTC. The time now is 13:16.