mersenneforum.org  

Go Back   mersenneforum.org > Fun Stuff > Lounge

Reply
 
Thread Tools
Old 2010-12-21, 03:06   #650
axn
 
axn's Avatar
 
Jun 2003

10011110111112 Posts
Default

A handy reference to have: http://www.mersenne.org/various/math.php
axn is offline   Reply With Quote
Old 2010-12-21, 03:31   #651
Mini-Geek
Account Deleted
 
Mini-Geek's Avatar
 
"Tim Sorbera"
Aug 2006
San Antonio, TX USA

17×251 Posts
Default

Quote:
Originally Posted by Batalov View Post
P.S. Yes, it sure does. Tested:
Pminus1=1,2,53035711,-1,1700,21000
=>
P-1 found a factor in stage #1, B1=1700.
M53035711 has a factor: 61678157492310549218180505113
How is this factor found in stage #1 with these bounds? I'm afraid I don't understand what you mean by "Does Prime95 preload with group order p?" Of course, I knew it accounted for the exponent p in the factor's P-1, but how does 20719 also fall into a special category for your example?
Mini-Geek is offline   Reply With Quote
Old 2010-12-21, 07:48   #652
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

9,497 Posts
Default

Quote:
Originally Posted by Mini-Geek View Post
How is this factor found in stage #1 with these bounds? I'm afraid I don't understand what you mean by "Does Prime95 preload with group order p?" Of course, I knew it accounted for the exponent p in the factor's P-1, but how does 20719 also fall into a special category for your example?
Doesn't the handy link explain that? Oh my... I would think that it explains everything in the world!

For Q1, see GMP-ECM:
> ecm --help |grep order
-go val Preload with group order val

ECM-GMP is geared to any general numbers, and there, it is an option.
Prime95 does that without asking, naturally, because the query is an M-number.

However, for the second question, you will have to look in the source. My guess is that it increases small B1 values to some limit (and then the report is misleading: the real B1 may have not been 1700. Try it the test, though; the printout is genuine.) I ran not one similar test but three (one had B1=7000, B2=34000; it ran much faster than the result shown above and did find the factor in Stage 2, which leads me to believe that B1 was internally modified in the first case). Now, let's see the source...

Last fiddled with by Batalov on 2010-12-21 at 08:24 Reason: ...
Batalov is offline   Reply With Quote
Old 2010-12-21, 23:13   #653
cheesehead
 
cheesehead's Avatar
 
"Richard B. Woods"
Aug 2002
Wisconsin USA

769210 Posts
Default

Quote:
Originally Posted by Batalov View Post
P.S. Yes, it sure does. Tested:
Pminus1=1,2,53035711,-1,1700,21000
=>
P-1 found a factor in stage #1, B1=1700.
M53035711 has a factor: 61678157492310549218180505113
Can you re-check that? What program and version is yours?

I just ran prime95 V25.8 with

Code:
Pminus1=1,2,53035711,-1,1700,21000
and got

Code:
[Tue Dec 21 16:21:19 2010]
P-1 found a factor in stage #2, B1=1700, B2=21000.
UID: RichBWoods/Puttputt, M53035711 has a factor: 61678157492310549218180505113
... finding it in stage 2, not stage 1.

Last fiddled with by cheesehead on 2010-12-21 at 23:16
cheesehead is offline   Reply With Quote
Old 2010-12-21, 23:40   #654
Mini-Geek
Account Deleted
 
Mini-Geek's Avatar
 
"Tim Sorbera"
Aug 2006
San Antonio, TX USA

426710 Posts
Default

Quote:
Originally Posted by cheesehead View Post
I just ran prime95 V25.8
...
finding it in stage 2, not stage 1.
I just checked 24.14 and 26.4 as well. As you should expect, neither found the factor in the stage 1 GCD. 26.4 used the 2880K FFT in both stages, and 24.14 chose the 3072K FFT for both stages.
I'll repeat cheesehead's question: Batalov, what program/version/unusual settings were you using? Can you replicate your result?

Last fiddled with by Mini-Geek on 2010-12-21 at 23:50
Mini-Geek is offline   Reply With Quote
Old 2010-12-22, 00:06   #655
cheesehead
 
cheesehead's Avatar
 
"Richard B. Woods"
Aug 2002
Wisconsin USA

22×3×641 Posts
Default

Quote:
Originally Posted by Batalov View Post
However, for the second question, you will have to look in the source. My guess is that it increases small B1 values to some limit (and then the report is misleading: the real B1 may have not been 1700. Try it the test, though; the printout is genuine.) I ran not one similar test but three (one had B1=7000, B2=34000; it ran much faster than the result shown above and did find the factor in Stage 2, which leads me to believe that B1 was internally modified in the first case). Now, let's see the source...
I've just looked in the v25.11 source.

There is an adjustment of B1 that is below 30 (any lower B1 is adjusted to 30), but definitely not 1700. It's in module ecm.c (which handles both ECM and P-1). (Note: at this point variable B contains the B1 value. B2 value is in variable C.)

Code:
/* Override silly bounds */

    if (B < 30) {
        OutputStr (thread_num, "Using minimum bound #1 of 30\n");
        B = 30;
Another find in module ecm.c is that prime95 won't report, to the server, the result of an unsuccessful P-1 (or ECM) if B1 < 10000. George's comment is "Send P-1 completed message to the server. Although don't do it for puny values as this is just the user tinkering with P-1 factoring."

That wasn't in the version that was current a few years ago. One could find hundreds of recorded P-1 results with B1=30, hundreds more with B1=1000 or 2000 or 5000.

Quote:
Originally Posted by Batalov View Post
(and then the report is misleading: the real B1 may have not been 1700.
In general, prime95 never misleads the user like that. In the particular case above, note that when B1 is adjusted to 30, there's a specific message displayed to the user.

Last fiddled with by cheesehead on 2010-12-22 at 00:22
cheesehead is offline   Reply With Quote
Old 2010-12-22, 00:30   #656
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

9,497 Posts
Default

I, too, negatively reproduced it first on another computer, then negatively on the original. It is probably complicated, but the storyline did involve the computer with memory very full, a kill of the executable and a restart (and also an edit of the worktodo.txt before the restart; I added the other two tests and changed this test's task line; B1 was changed). I don't know which of the changes caused this.
I suspect that there may be a rare condition when prime95 picks up from the savefile and respects B1 from file and not from the worktodo.txt. The full tail from results.txt, verbatim:
Code:
...
[Wed Dec 01 14:59:24 2010]
100010001*10^81776+1 is not prime. RES64: 1561541EE8179A9F. We1: 5F2EA482,00000000
100010001*10^81782+1 is not prime. RES64: 5493E4AC12858258. We1: 5F3AA48E,00000000
[Wed Dec 01 15:05:24 2010]
100010001*10^81785+1 is not prime. RES64: ADF84598C2ECF6E2. We1: 5F40A494,00000000
[Mon Dec 20 17:44:31 2010]
P-1 found a factor in stage #1, B1=1700.
M53035711 has a factor: 61678157492310549218180505113
[Mon Dec 20 19:05:03 2010]
P-1 found a factor in stage #2, B1=31000, B2=34000.
M53376457 has a factor: 22929204969316047666071720567
[Mon Dec 20 19:30:35 2010]
P-1 found a factor in stage #2, B1=7000, B2=34000.
M53470243 has a factor: 21377386912469750377694939071
[Tue Dec 21 01:09:21 2010]
P-1 found a factor in stage #2, B1=1700, B2=21000.
M53035711 has a factor: 61678157492310549218180505113
M53035711 already tested to B1=1700 and B2=21000.
M53035711 already tested to B1=1700 and B2=21000.
[Tue Dec 21 01:12:20 2010]
M53035711 already tested to B1=1700 and B2=21000.
I am puzzled too (!!) and haven't been able to reproduce it as originally.

The version is 26.4 (Size: 26,705,920 bytes; Dated: Saturday, November 13, 2010, 2:46:00 PM)
The handpicked tests were these (got them from results in the M53M range with a filter on factor size, then factor and sort on exceptional smoothness sans p):
Code:
Pminus1=1,2,53035711,-1,1700,21000
Pminus1=1,2,53376457,-1,31000,34000
Pminus1=1,2,53470243,-1,7000,34000
I was planing to resume reconstruction of this feature (if not a bug) over the coming long weekend; I was too tired by 3am. It is unusual though. Too rare to be bothered.
______________________
Mods: branch this, maybe? Sorry for the twisted tangent, all my fault of course.
It is not all too happy and not a meal. ;-)

______________________________


P.S. There's kind of a bug/feature: Pminus1 leaves rather large savefiles in the directory after it is done. This is how P95 later 'knows' that "M53035711 already tested to B1=1700 and B2=21000." They have to be deleted to do it again. For most users, they will stay as a dead baggage for the HD (which I think is a bug).

Last fiddled with by Batalov on 2010-12-22 at 01:03 Reason: P.S.
Batalov is offline   Reply With Quote
Old 2010-12-22, 02:09   #657
cheesehead
 
cheesehead's Avatar
 
"Richard B. Woods"
Aug 2002
Wisconsin USA

22·3·641 Posts
Default

Quote:
Originally Posted by Batalov View Post
I, too, negatively reproduced it first on another computer, then negatively on the original. It is probably complicated, but the storyline did involve the computer with memory very full, a kill of the executable and a restart (and also an edit of the worktodo.txt before the restart; I added the other two tests and changed this test's task line; B1 was changed).
Thank you for your efforts and this report! :-)

Quote:
_____________________
Mods: branch this, maybe? Sorry for the twisted tangent, all my fault of course.
It is not all too happy and not a meal. ;-)

______________________________
I second this suggestion.

Quote:
P.S. There's kind of a bug/feature: Pminus1 leaves rather large savefiles in the directory after it is done. This is how P95 later 'knows' that "M53035711 already tested to B1=1700 and B2=21000." They have to be deleted to do it again. For most users, they will stay as a dead baggage for the HD (which I think is a bug).
I agree about the dead baggage, but of course, the difficulty is that leaving the savefile is necessary for the user to resume P-1 to higher limits later without repeating all previous computation.

Suggestion: Make prime95 erase P-1 save files by default, and add a worktodo parameter that cancels this.
Pro: Works for the majority of folks not interested in going to higher limits ... but ...
Con: Changing the default behavior is dangerous! Forget to add the new parameter, and there goes all your hard work!

Safer suggestion: At the end of a P-1, display a message reminding the user that the save file is being left there.
Pro: Unchanged default behavior.
Con: Doesn't do much to solve the problem for the majority of users, who'll probably resent being asked, in effect, to clean up the savefiles themselves, and will probably ask why the program "can't" do that itself.

Q: Does Windows or Linux provide a way to assign an expiration date to a file when it's created?
cheesehead is offline   Reply With Quote
Old 2010-12-22, 02:42   #658
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

9,497 Posts
Default

Now, I started thinking (there are thoughts to this end in the code) that George separates "Pminus1=..." tasks' behavior from a routine P-1 (viz. in the LL pipeline's context). So, leaving savefiles is an intended behavior. I would limit removal to the .bu and .bu2 files at the clear exit from a finished Pminus1 test but keep the 'm' savefile for the increased-limits reruns. (At least, that'll be 1/3 of the lost luggage for some, and an intended save for others.)

For the puzzle, here's where I am digging now:
Code:
:::ecm.c:::
/* Check for the rare case where we need to do even more stage 1 */
/* This happens when a save file was created with a smaller bound #1 */
/* than the bound #1 passed into this routine */
        if (B > pm1data.B) {
more_B:         pm1data.B = B;
                stop_reason = start_sieve (&pm1data.si, thread_num, 2);
                if (stop_reason) goto exit;
                prime = sieve (&pm1data.si);
                goto restart1;
        }
Could have inadvertently wandered into this section's execution by all the changes, but it still remains to be seen how the 1700 value survived for the final printout. Still some head-scratching in progress.


P.S. I am digging there because (and I mentioned it earlier --) that the mysterious test was almost as long as its later sibling (see above) with B1=31000 and definitely much longer than its third sibling with B1=7000. I do believe that in the execution, pm1data.B was upped to B2, but not in the variable that holds it for the final printout (B) - that's why the answer was found, that's why it was long. With some combination of environmental factors (the savefile, the contradicting worktodo.txt, a kill, a restart), the execution may have goto'd into that label more_B... (and hence digging how could it have happened).

Last fiddled with by Batalov on 2010-12-22 at 02:52 Reason: P.S.
Batalov is offline   Reply With Quote
Old 2010-12-22, 12:54   #659
Mini-Geek
Account Deleted
 
Mini-Geek's Avatar
 
"Tim Sorbera"
Aug 2006
San Antonio, TX USA

17×251 Posts
Default

Quote:
Originally Posted by Batalov View Post
I suspect that there may be a rare condition when prime95 picks up from the savefile and respects B1 from file and not from the worktodo.txt.
I am puzzled too (!!) and haven't been able to reproduce it as originally.

The version is 26.4 (Size: 26,705,920 bytes; Dated: Saturday, November 13, 2010, 2:46:00 PM)
The handpicked tests were these (got them from results in the M53M range with a filter on factor size, then factor and sort on exceptional smoothness sans p):
Code:
Pminus1=1,2,53035711,-1,1700,21000
Pminus1=1,2,53376457,-1,31000,34000
Pminus1=1,2,53470243,-1,7000,34000
I was planing to resume reconstruction of this feature (if not a bug) over the coming long weekend; I was too tired by 3am. It is unusual though. Too rare to be bothered.
I've reproduced the bug. It has to do, as you suspected, with a mismatch between the save file's B1 and the worktodo's B1. Note that I have the iterations between screen outputs set to 100, with B1=1700, that's ~4% of the progress, and with B1=21000, that's ~0.33% of the progress (between the two B1s, there aren't any other visible differences, except what B1 Prime95 should report: they both use 2880K FFT and report every ~5.6 seconds). Here's how I did it:
Put this line in worktodo.txt:
Code:
Pminus1=1,2,53035711,-1,21000,21000
And start Prime95 then stop and close it so it creates a save file. As expected, it reports that B1=21000. Then change the line to:
Code:
Pminus1=1,2,53035711,-1,1700,21000
(i.e. change the B1 to 1700) then start and continue Prime95. It says:
Code:
[Dec 22 06:46] Worker starting
[Dec 22 06:46] Setting affinity to run worker on any logical CPU.
[Dec 22 06:46] P-1 on M53035711 with B1=1700, B2=21000
[Dec 22 06:46] Using Core2 type-3 FFT length 2880K, Pass1=640, Pass2=4608
[Dec 22 06:46] M53035711 stage 1 is 2.317355% complete.
[Dec 22 06:46] M53035711 stage 1 is 2.647933% complete. Time: 5.579 sec.
[Dec 22 06:46] M53035711 stage 1 is 2.978512% complete. Time: 5.574 sec.
[Dec 22 06:46] M53035711 stage 1 is 3.309090% complete. Time: 5.602 sec.
[Dec 22 06:47] M53035711 stage 1 is 3.639669% complete. Time: 5.554 sec.
[Dec 22 06:47] M53035711 stage 1 is 3.970247% complete. Time: 5.551 sec.
...
Note that the percentage for each line is ~0.33%, which corresponds to B1=21000, even though it reports B1=1700. This accounts for the time difference you saw, and explains the bug. And sure enough, it found it in stage 1, and thinks it was with B1=1700:
Code:
P-1 found a factor in stage #1, B1=1700.
UID: x, M53035711 has a factor: 61678157492310549218180505113

Last fiddled with by Mini-Geek on 2010-12-22 at 13:21
Mini-Geek is offline   Reply With Quote
Old 2010-12-22, 13:08   #660
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

9,497 Posts
Default

Great, thanks!

(I hate to report irreproducible results - they look made-up and create a Munchausen effect on the audience.)

Batalov is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Original or Remake, which is better? Uncwilly Lounge 6 2007-09-15 22:20
Original magic tetrahedron problem (0mtp) mfgoode Puzzles 5 2006-04-10 15:51
The original paper on the Crandall/Fagin DWT Barry Fagin Math 2 2006-01-04 19:46
monster prime hunting (original in German) Jagd nach der Monsterprimzahl cyrix Lounge 6 2004-06-11 08:29
Deutscher Thread (german thread) TauCeti NFSNET Discussion 0 2003-12-11 22:12

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


Fri Aug 6 21:57:00 UTC 2021 up 14 days, 16:25, 1 user, load averages: 3.20, 3.06, 2.75

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.