mersenneforum.org  

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

Reply
 
Thread Tools
Old 2014-12-15, 07:56   #1
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

23A816 Posts
Default A possible bug in LLR/PFGW while using GWNUM (no bug in P95)

Quote:
Originally Posted by Prime95 View Post
Congrats. Try adding PRPBase=n to prime.txt.
Hmmm...

I added PRPBase=7 to prime.txt and I got that 1024 · 3^1877301 + 1 is a 7-PRP (??).
I changed PRPBase=11 in prime.txt and I got that 1024 · 3^1877301 + 1 is a 11-PRP (??).
Yet it is a composite by pfgw and llr (or mprime doesn't actually change the base). Though it is likely a 3-PRP (and a 3-SPRP by llr).

I am using one worker with 12, 16, 24 threads (27.9, the AVX code is being used).
Maybe the multi-threaded code doesn't change the base?
Batalov is offline   Reply With Quote
Old 2014-12-15, 08:10   #2
axn
 
axn's Avatar
 
Jun 2003

24·5·59 Posts
Default

Quote:
Originally Posted by Batalov View Post
Maybe the multi-threaded code doesn't change the base?
Easy enough to check by applying it on (another) (small) composite number and making sure the residues are all different?
axn is offline   Reply With Quote
Old 2014-12-15, 08:44   #3
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

23·7·163 Posts
Default

That's a good idea! Thanks. RES64 values are different!

I've now put PRPBase=5 everywhere. Before [PrimeNet] section, after, and in local.txt, too. ;-)

Now, I am thinking, maybe this is after all a prime? Can't be so easily a 7-PRP and a 11-PRP and a 3-PRP and then a composite.
Maybe the reason is a devious FFT overflow.
Batalov is offline   Reply With Quote
Old 2014-12-15, 09:04   #4
axn
 
axn's Avatar
 
Jun 2003

24·5·59 Posts
Default

Quote:
Originally Posted by Batalov View Post
Now, I am thinking, maybe this is after all a prime? Can't be so easily a 7-PRP and a 11-PRP and a 3-PRP and then a composite.
Maybe the reason is a devious FFT overflow.
If the latest PFGW still supports it, time to run it with -a1 or -a2 ?
axn is offline   Reply With Quote
Old 2014-12-15, 09:20   #5
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

23·7·163 Posts
Default

Yes, I am running that but it will take quite a bit of time.

Another one that I am running (actually times five): llr N-1 with FermatBase=7, 11, 13, 17, 19 (you change it in llr.ini, before the test).
What is nice is that with a=11, a different FFT size is chosen. (For a=5 240K, for a=11, 256K.)
Batalov is offline   Reply With Quote
Old 2014-12-15, 10:08   #6
axn
 
axn's Avatar
 
Jun 2003

24·5·59 Posts
Default

FWIW
Code:
1024*3^1877301+1 is a probable prime! We4: EC696ADA,00000000
This is with
Code:
PRPBase=2
Running single thread using P95 v28.5 build 2 Win64 version on a Core-i5 3340M
axn is offline   Reply With Quote
Old 2014-12-15, 11:23   #7
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

912810 Posts
Cool

My pfgw runs finished. By them, ... it is a prime, after all.

Code:
PFGW Version 3.7.2.64BIT.20130122.x86_Dev [GWNUM 27.9]

Output logging to file pfgw.out
Factoring numbers to 1% of normal.

Primality testing 1024*3^1877301+1 [N-1, Brillhart-Lehmer-Selfridge]
Running N-1 test using base 5
1024*3^1877301+1 is prime! (12398.0381s+0.0164s)
This thing is driving me nuts. ;-) There must be some numeric instability in FFT.

(Plus many PRP tests in many bases with P95 are positive. The -a2 test is still running...)
Batalov is offline   Reply With Quote
Old 2014-12-15, 11:50   #8
axn
 
axn's Avatar
 
Jun 2003

24×5×59 Posts
Default

Quote:
Originally Posted by Batalov View Post
This thing is driving me nuts. ;-) There must be some numeric instability in FFT.
Indeed. Over the years, there have been similar instances reported in the forum -- where a positive PRP test was overruled by a proof test.

I think in all such cases, we should suspect the proof test, because it is much more probable that an error caused the "composite" result rather than the incredibly rare occurrence of a large pseudoprime.
axn is offline   Reply With Quote
Old 2014-12-15, 11:59   #9
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

23·7·163 Posts
Default

This is probably confined to k*b^n+-1 where b>2, especially b=3 (because the default PRP/N-1 test base is 3). Only those who hunt for "non-boring" primes occasionally step into these traps -- this includes people at CRUS.

b=2 is relatively much better debugged - traditional Proth/Riesel which are the mainstream. The prime database is cracking at the seams with these (esp. the b=2, n=1290000).
Batalov is offline   Reply With Quote
Old 2014-12-15, 22:01   #10
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

2×1,723 Posts
Default

How many digits does your problem number have? I ask because TPP says 895704, but I get this:

Code:
 ./pfgw64 -od -q"1024*3^1877301+1"
PFGW Version 3.7.7.64BIT.20130722.x86_Dev [GWNUM 27.11]

1024*3^1877301+1: 16554132 <SNIP> 818435073
Code:
 wc Serge
     1      1 895705 Serge
ps. I am running your number through a GMP implementation of my algorithm with the GWNUM 27.11 output from pfgw64.

Last fiddled with by paulunderwood on 2014-12-15 at 22:08
paulunderwood is offline   Reply With Quote
Old 2014-12-15, 22:13   #11
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

112×59 Posts
Default

I ran this using prime95 version 28.5 with AVX but not FMA FFTs. Prime95 chose a 240K FFT size. Round off error was only 0.02. It worked.

My conclusion is the problem is not in choosing an FFT size that is too small. Either a GWNUM bug was fixed between 27.9 and 28.5 or PFGW's PRP code is doing something subtly different than prime95's and either has a bug or reveals a bug in GWNUM.

I'm a little confused about what is failing in PFGW. Does PFGW report it as a PRP or is the problem only in the N-1 proving code?
Prime95 is online now   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
PFGW 3.8.3 (with gwnum v28.7) Released rogue Software 483 2020-07-19 20:26
LLR V3.8.2 using gwnum 26.2 is available! Jean Penné Software 25 2010-11-01 15:18
PFGW 3.3.6 or PFGW 3.4.2 Please update now! Joe O Sierpinski/Riesel Base 5 5 2010-09-30 14:07
GWNUM? Unregistered Information & Answers 3 2010-09-12 19:52
GWNUM as DLL? Cyclamen Persicum Software 1 2007-01-02 20:53

All times are UTC. The time now is 23:48.

Thu Oct 29 23:48:38 UTC 2020 up 49 days, 20:59, 1 user, load averages: 1.74, 2.02, 2.00

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