Join PrimeGrid
Returning Participants
Community
Leader Boards
Results
Other
drummers-lowrise
|
Message boards :
Number crunching :
b^{2^n} - b^{2^{n-1}} + 1
| Author |
Message |
Yves GallotVolunteer developer Project scientist Send message
Joined: 19 Aug 12 Posts: 669 ID: 164101 Credit: 305,042,960 RAC: 0

|
|
I just wrote a new application "Cyclo".
It searches for (probable) primes of the form b^{2^n} - b^{2^{n-1}} + 1.
It is about as fast as Genefer, the "bound" bMax is a bit smaller.
The first version is an OpenCL application for Windows that can be downloaded at
http://yves.gallot.pagesperso-orange.fr/Cyclo/
Source code is available if someone wants to compile it for another OS.
The form b^{2^n} - b^{2^{n-1}} + 1 has never been tested, it is an open range!
Because a sieve is not available yet, small factors are checked quickly in this version. But of course a sieve is necessary to test efficiently these numbers (is anybody volunteering?).
Note that b^{2^n} - b^{2^{n-1}} + 1 = Phi_{3.2^n}(b), the 3.2^n-th cyclotomic polynomial. Then its factors are of the form k.3.2^n + 1.
The small list
2^2 - 2^1 + 1
2^4 - 2^2 + 1
2^8 - 2^4 + 1
5^16 - 5^8 + 1
4^32 - 4^16 + 1
2^64 - 2^32 + 1
5^128 - 5^64 + 1
196^256 - 196^128 + 1
14^512 - 14^256 + 1
129^1024 - 129^512 + 1
424^2048 - 424^1024 + 1
484^4096 - 484^2048 + 1
22^8192 - 22^4096 + 1
should be completed...
Yves | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
|
Yves,
When running -b, it seems to be testing (b^n) - (b^n) + 1 rather than (b^n) - (b^(n/2)) + 1. Is that intentional?
Cyclo (OpenCL, v0.1), Copyright (C) 2014-15, Yves Gallot.
2199064^8192 - 2199064^8192 + 1 Time: 24.7 us / mul. Err : 0.4688 51956 digits
1798620^16384 - 1798620^16384 + 1 Time: 30.8 us / mul. Err : 0.4063 102481 digits
1471094^32768 - 1471094^32768 + 1 Time: 43.1 us / mul. Err : 0.4375 202102 digits
1203210^65536 - 1203210^65536 + 1 Time: 82.3 us / mul. Err : 0.4336 398482 digits
984108^131072 - 984108^131072 + 1 Time: 174 us / mul. Err : 0.4375 785521 digits
804904^262144 - 804904^262144 + 1 Time: 360 us / mul. Err : 0.4375 1548156 digits
658332^524288 - 658332^524288 + 1 Time: 643 us / mul. Err : 0.4141 3050541 digits
538452^1048576 - 538452^1048576 + 1 Time: 1.31 ms / mul. Err : 0.4102 6009544 digits
440400^2097152 - 440400^2097152 + 1 Time: 2.64 ms / mul. Err : 0.3984 11836006 digits
360204^4194304 - 360204^4194304 + 1 Time: 5.64 ms / mul. Err : 0.4297 23305854 digits
294612^8388608 - 294612^8388608 + 1 Time: 12.2 ms / mul. Err : 0.4141 45879398 digits
Also, at what value of maxErr is it supposed to error out? It appears it's accepting a calculation where maxErr is 0.5:
C:\Temp\Cyclo>cycloocl -q "3001210^65536-3001210^32768+1
Cyclo (OpenCL, v0.1), Copyright (C) 2014-15, Yves Gallot.
3001210^65536 - 3001210^32768 + 1 is composite [Res=98201253863]. (121.5 sec., err=5.00e-001)
____________
My lucky number is 75898524288+1 | |
|
serge  Send message
Joined: 21 Jun 12 Posts: 112 ID: 144858 Credit: 257,402,313 RAC: 98,569
                    
|
|
These are related to PIES. Mike Oakes and then Phil Carmody searched in this class for years.
Powers of 3 are also admissible in place of 2^{n-1}, this one being the largest known. In the Prime database, these are hidden as Phi() expressions; one won't find them with the advanced form (with e.g. '^[0123456789]{1,}^[0123456789]{1,}-[0123456789]{1,}^[0123456789]{1,}+1')
And on the plus side (b^{2*m} + b^{m} + 1), all 3-smooth m values are admissible.
With only squaring implemented, b^{2^n} + b^{2^{n-1}} + 1 is still also a good interesting form. | |
|
Yves GallotVolunteer developer Project scientist Send message
Joined: 19 Aug 12 Posts: 669 ID: 164101 Credit: 305,042,960 RAC: 0

|
When running -b, it seems to be testing (b^n) - (b^n) + 1 rather than (b^n) - (b^(n/2)) + 1. Is that intentional?
No, but it's just an error in the print command, the tested number is b^n - b^(n/2) + 1 : it will be corrected in the next release.
Also, at what value of maxErr is it supposed to error out? It appears it's accepting a calculation where maxErr is 0.5
It is maxErr: it is printed but not tested (then maxErr > 0.45 is possible and the result may be wrong in that case).
Note that an unlocked version could be useful:
CycloOCL.exe -q "9000077^128 - 9000077^64 + 1"
Cyclo (OpenCL, v0.1), Copyright (C) 2014-15, Yves Gallot.
9000077^128 - 9000077^64 + 1 is a probable prime. (0.9 sec., err=5.00e-001)
and it is prime!
The benchmark values seem to be some reasonable bounds. | |
|
|
|
|
Hi Yves,
This looks very interesting. I have posted a Mac build and makefile to http://www.epcc.ed.ac.uk/~ibethune/files/cyclo_mac.tar.gz. Feel free to redistribute from your page if you want.
I ran some tests on my machine with an AMD FirePro D700:
macpro-ib:cyclo ibethune$ ./cyclo_macintel -t
Cyclo (OpenCL, v0.1), Copyright (C) 2014-15, Yves Gallot.
2^64 - 2^32 + 1 is a probable prime. (0.0 sec., err=2.22e-14)
5^128 - 5^64 + 1 is a probable prime. (0.0 sec., err=1.35e-13)
196^256 - 196^128 + 1 is a probable prime. (0.2 sec., err=3.84e-10)
14^512 - 14^256 + 1 is a probable prime. (0.2 sec., err=3.44e-12)
129^1024 - 129^512 + 1 is a probable prime. (0.6 sec., err=1.40e-09)
424^2048 - 424^1024 + 1 is a probable prime. (1.6 sec., err=2.20e-08)
484^4096 - 484^2048 + 1 is a probable prime. (3.5 sec., err=5.26e-08)
22^8192 - 22^4096 + 1 is a probable prime. (3.5 sec., err=2.92e-10)
10000120^64 - 10000120^32 + 1 is a probable prime. (0.1 sec., err=4.38e-01)
7000009^128 - 7000009^64 + 1 is composite [Res=442454942]. (0.3 sec., err=2.81e-01)
5000349^256 - 5000349^128 + 1 is composite [Res=637926927]. (0.5 sec., err=3.44e-01)
4000414^512 - 4000414^256 + 1 is a probable prime. (1.0 sec., err=2.81e-01)
3001210^1024 - 3001210^512 + 1 is a probable prime. (2.0 sec., err=3.52e-01)
Not sure if the two composites were expected or not?
macpro-ib:cyclo ibethune$ ./cyclo_macintel -b
Cyclo (OpenCL, v0.1), Copyright (C) 2014-15, Yves Gallot.
2199064^8192 - 2199064^8192 + 1 Time: 96.2 us / mul. Err : 0.5000 51956 digits
1798620^16384 - 1798620^16384 + 1 Time: 95.9 us / mul. Err : 0.5000 102481 digits
1471094^32768 - 1471094^32768 + 1 Time: 97.3 us / mul. Err : 0.5000 202102 digits
1203210^65536 - 1203210^65536 + 1 Time: 99.8 us / mul. Err : 0.5000 398482 digits
984108^131072 - 984108^131072 + 1 Time: 103 us / mul. Err : 0.5000 785521 digits
804904^262144 - 804904^262144 + 1 Time: 156 us / mul. Err : 0.5000 1548156 digits
658332^524288 - 658332^524288 + 1 Time: 167 us / mul. Err : 0.5000 3050541 digits
538452^1048576 - 538452^1048576 + 1 Time: 180 us / mul. Err : 0.5000 6009544 digits
440400^2097152 - 440400^2097152 + 1 Time: 194 us / mul. Err : 0.5000 11836006 digits
360204^4194304 - 360204^4194304 + 1 Time: 207 us / mul. Err : 0.5000 23305854 digits
294612^8388608 - 294612^8388608 + 1 Time: 176 us / mul. Err : 0.5000 45879398 digits
Benchmark times are a little odd, since n=23 is consistently faster than n=22. I note that the errors here are high (this may explain the composites before?). I suspect this is due to the non-IEEE floating point on these cards, as we found before with Genefer, but I haven't gone digging into the code to propose a fix yet!
Cheers
- Iain
____________
Twitter: IainBethune
Proud member of team "Aggie The Pew". Go Aggie!
3073428256125*2^1290000-1 is Prime! | |
|
Tyler Project administrator Volunteer tester Send message
Joined: 4 Dec 12 Posts: 1077 ID: 183129 Credit: 1,356,850,829 RAC: 15,645
                      
|
|
Seems to have run fine on my PC -- Win 7 pro x64, Intel i5-2500k w/ Nvidia GTX 760
D:\PSA\Cyclo>CycloOCL.exe -t
Cyclo (OpenCL, v0.1), Copyright (C) 2014-15, Yves Gallot.
2^64 - 2^32 + 1 is a probable prime. (0.1 sec., err=8.88e-015)
5^128 - 5^64 + 1 is a probable prime. (0.0 sec., err=1.32e-013)
196^256 - 196^128 + 1 is a probable prime. (0.1 sec., err=2.91e-010)
14^512 - 14^256 + 1 is a probable prime. (0.1 sec., err=2.50e-012)
129^1024 - 129^512 + 1 is a probable prime. (0.4 sec., err=8.15e-010)
424^2048 - 424^1024 + 1 is a probable prime. (0.6 sec., err=6.29e-009)
484^4096 - 484^2048 + 1 is a probable prime. (1.2 sec., err=1.26e-008)
22^8192 - 22^4096 + 1 is a probable prime. (1.4 sec., err=4.32e-011)
10000120^64 - 10000120^32 + 1 is a probable prime. (0.1 sec., err=2.58e-001)
7000009^128 - 7000009^64 + 1 is a probable prime. (0.1 sec., err=3.75e-001)
5000349^256 - 5000349^128 + 1 is a probable prime. (0.2 sec., err=3.75e-001)
4000414^512 - 4000414^256 + 1 is a probable prime. (0.5 sec., err=2.19e-001)
3001210^1024 - 3001210^512 + 1 is a probable prime. (1.2 sec., err=1.88e-001)
D:\PSA\Cyclo>CycloOCL.exe -b
Cyclo (OpenCL, v0.1), Copyright (C) 2014-15, Yves Gallot.
2199064^8192 - 2199064^8192 + 1 Time: 41.4 us / mul. Err : 0.4688 51956 digits
1798620^16384 - 1798620^16384 + 1 Time: 41.8 us / mul. Err : 0.4063 102481 digits
1471094^32768 - 1471094^32768 + 1 Time: 64.5 us / mul. Err : 0.4375 202102 digits
1203210^65536 - 1203210^65536 + 1 Time: 113 us / mul. Err : 0.4336 398482 digits
984108^131072 - 984108^131072 + 1 Time: 220 us / mul. Err : 0.4375 785521 digits
804904^262144 - 804904^262144 + 1 Time: 392 us / mul. Err : 0.4375 1548156 digits
658332^524288 - 658332^524288 + 1 Time: 768 us / mul. Err : 0.4141 3050541 digits
538452^1048576 - 538452^1048576 + 1 Time: 1.58 ms / mul. Err : 0.4102 6009544 digits
440400^2097152 - 440400^2097152 + 1 Time: 3.33 ms / mul. Err : 0.3984 11836006 digits
360204^4194304 - 360204^4194304 + 1 Time: 6.84 ms / mul. Err : 0.4297 23305854 digits
294612^8388608 - 294612^8388608 + 1 Time: 14.9 ms / mul. Err : 0.4141 45879398 digits
____________
275*2^3585539+1 is prime!!! (1079358 digits)
Proud member of Aggie the Pew
| |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
macpro-ib:cyclo ibethune$ ./cyclo_macintel -b
Cyclo (OpenCL, v0.1), Copyright (C) 2014-15, Yves Gallot.
2199064^8192 - 2199064^8192 + 1 Time: 96.2 us / mul. Err : 0.5000 51956 digits
1798620^16384 - 1798620^16384 + 1 Time: 95.9 us / mul. Err : 0.5000 102481 digits
1471094^32768 - 1471094^32768 + 1 Time: 97.3 us / mul. Err : 0.5000 202102 digits
1203210^65536 - 1203210^65536 + 1 Time: 99.8 us / mul. Err : 0.5000 398482 digits
984108^131072 - 984108^131072 + 1 Time: 103 us / mul. Err : 0.5000 785521 digits
804904^262144 - 804904^262144 + 1 Time: 156 us / mul. Err : 0.5000 1548156 digits
658332^524288 - 658332^524288 + 1 Time: 167 us / mul. Err : 0.5000 3050541 digits
538452^1048576 - 538452^1048576 + 1 Time: 180 us / mul. Err : 0.5000 6009544 digits
440400^2097152 - 440400^2097152 + 1 Time: 194 us / mul. Err : 0.5000 11836006 digits
360204^4194304 - 360204^4194304 + 1 Time: 207 us / mul. Err : 0.5000 23305854 digits
294612^8388608 - 294612^8388608 + 1 Time: 176 us / mul. Err : 0.5000 45879398 digits
Benchmark times are a little odd, since n=23 is consistently faster than n=22. I note that the errors here are high (this may explain the composites before?). I suspect this is due to the non-IEEE floating point on these cards, as we found before with Genefer, but I haven't gone digging into the code to propose a fix yet!
Cheers
- Iain
Those benchmark times are a LOT odd -- and reminiscent of the benchmark problems we had early on with the Linux version of geneferCUDA. The root cause of that problem is that the timing function being used records elapsed time on Windows but CPU time on Linux and Mac. If you simply built cyclo on Mac without changing the API call for elapsed time, it's probably measuring the CPU time. For a CPU app you likely wouldn't notice the difference, but in this case it's not what you want for a GPU app.
____________
My lucky number is 75898524288+1 | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
7000009^128 - 7000009^64 + 1 is composite [Res=442454942]. (0.3 sec., err=2.81e-01)
5000349^256 - 5000349^128 + 1 is composite [Res=637926927]. (0.5 sec., err=3.44e-01)
Not sure if the two composites were expected or not?
Comes up as PRP on my computer, and they are, in fact prime.
7000009^128 - 7000009^64 + 1 is a probable prime. (0.1 sec., err=3.75e-001)
5000349^256 - 5000349^128 + 1 is a probable prime. (0.2 sec., err=3.75e-001)
What is interesting is that PFGW, with the -t switch, can NOT prove the primality of those two numbers. It declares them to be PRP, but not prime. With the others (the ones showing as probable prime on your MAC) PFGW can determine that they're prime.
LLR says they're all prime, including those two "special" numbers.
____________
My lucky number is 75898524288+1 | |
|
Yves GallotVolunteer developer Project scientist Send message
Joined: 19 Aug 12 Posts: 669 ID: 164101 Credit: 305,042,960 RAC: 0

|
These are related to PIES. Mike Oakes and then Phil Carmody searched in this class for years.
You're right Phi_{3.2^n}(b) = Phi_{3}(-b^{2^{n-1}})
but this program uses a Z-transform, not a weighted transform and a FFT.
It is faster because there is no more weighted stage.
2^n is used because the transform is faster (and easier to write) in that case (like radix-2 FFT).
I don't see any Phi_{3}(+/-b^{2^n}) in the Prime database and the targets are megaprimes.
With only squaring implemented, b^{2^n} + b^{2^{n-1}} + 1 is still also a good interesting form.
This is the next form squeduled for "Cyclo". A priori, it is possible to generate quickly some probable primes with the other cyclotomic polynomials but we don't know how to prove the primality of these numbers.
When Phi_{3}(+/-b^{2^n}) is exausted, I will think to 3^n but there is time for that later. | |
|
serge  Send message
Joined: 21 Jun 12 Posts: 112 ID: 144858 Credit: 257,402,313 RAC: 98,569
                    
|
These are related to PIES. Mike Oakes and then Phil Carmody searched in this class for years.
Powers of 3 are also admissible in place of 2^{n-1}, this one being the largest known. In the Prime database, these are hidden as Phi() expressions; one won't find them with the advanced form (with e.g. '^[0123456789]{1,}^[0123456789]{1,}-[0123456789]{1,}^[0123456789]{1,}+1')
And on the plus side (b^{2*m} + b^{m} + 1), all 3-smooth m values are admissible.
With only squaring implemented, b^{2^n} + b^{2^{n-1}} + 1 is still also a good interesting form.
UTM has some numbers that can be double-checked with Cyclo.
http://primes.utm.edu/primes/search.php?Description=Phi%28%2565536%25&OnList=all&Number=9999 (none at this time)
http://primes.utm.edu/primes/search.php?Description=Phi%28%2532768%25&OnList=all&Number=9999 *
http://primes.utm.edu/primes/search.php?Description=Phi%28%2516384%25&OnList=all&Number=9999
http://primes.utm.edu/primes/search.php?Description=Phi%28%258192%25&OnList=all&Number=9999
http://primes.utm.edu/primes/search.php?Description=Phi%28%254096%25&OnList=all&Number=9999 ...etc**
*These were known ~ ten years ago to PIES, but Phil completely abandoned his webpages and wrote to me that he is taking a long break; he will not update them, but you can see the counts of primes here: for 8192, for 16384, for 32768 (5 were known in 2004).
**Note that you are not seeing any hits because you are not selecting one frequently neglected option at the bottom onList=All.
With openCL, -- on to megaprimes!
(I didn't post this data to detract from the value of the program. On the contrary, I think that this is a great thing! It is nice to have so many existing cases to thoroughly debug the new program.)
P.S. ...and yes, upon re-reading I realized that in my memory, I "switched" + and - sides. It is the other way around. For plus side, only powers of 3, for the minus side (which is your program's domain), 3-smooth numbers, which include powers of 2.
P.P.S. There are also relevant OEIS sequences with references.
http://oeis.org/A246119 will be extended by finding a n=16 prime.
And yet another way to see all of the large members of this class is to check Generalized Unique primes (they all are!)
____________
My lucky number is Phi(4, 2^2396029-1)/2.
| |
|
Yves GallotVolunteer developer Project scientist Send message
Joined: 19 Aug 12 Posts: 669 ID: 164101 Credit: 305,042,960 RAC: 0

|
7000009^128 - 7000009^64 + 1 is composite [Res=442454942]. (0.3 sec., err=2.81e-01)
5000349^256 - 5000349^128 + 1 is composite [Res=637926927]. (0.5 sec., err=3.44e-01)
294612^8388608 - 294612^8388608 + 1 Time: 176 us / mul. Err : 0.5000 45879398 digits
The v0.1 is a beta: errors are because AMD FirePro D700 is not IEEE compliant and timing is wrong because clock() is used (gettimeofday() must be used on Linux/Mac).
| |
|
Yves GallotVolunteer developer Project scientist Send message
Joined: 19 Aug 12 Posts: 669 ID: 164101 Credit: 305,042,960 RAC: 0

|
UTM has some numbers that can be double-checked with Cyclo.
http://primes.utm.edu/primes/search.php?Description=Phi%28%2565536%25&OnList=all&Number=9999 (none at this time)
http://primes.utm.edu/primes/search.php?Description=Phi%28%2532768%25&OnList=all&Number=9999 *
http://primes.utm.edu/primes/search.php?Description=Phi%28%2516384%25&OnList=all&Number=9999
http://primes.utm.edu/primes/search.php?Description=Phi%28%258192%25&OnList=all&Number=9999
http://primes.utm.edu/primes/search.php?Description=Phi%28%254096%25&OnList=all&Number=9999 ...etc**
Thanks a lot, I didn't find them :o(
That's very interesting for tests!
CycloOCL.exe -q "29906 65536"
Cyclo (OpenCL, v0.1), Copyright (C) 2014-15, Yves Gallot.
29906^65536 - 29906^32768 + 1 is a probable prime. (410.9 sec., err=3.15e-004)
P.P.S. There are also relevant OEIS sequences with references.
http://oeis.org/A246119 will be extended by finding a n=16 prime.
I missed this link too! I must buy Google For Dummies...
The good news it that if the search already exists then there is a sieve... ?
| |
|
serge  Send message
Joined: 21 Jun 12 Posts: 112 ID: 144858 Credit: 257,402,313 RAC: 98,569
                    
|
|
Phil had some sieve, but he seemed to be reluctant to revive the PIES webpages/programs (and without his help, it is not easily found).
I had a very simple-minded sieve for Eisenstein-Mersenne/Gaussian-Mersenne primes (based on mfaktc; trivial, straightforward modifications...), which I later patched to sieve for PIES-type numbers. I didn't search these since August, but I might have some presieved candidates for 65536. Of which I tested some with the modified LLR, but the tests were quite slow. I may revive that search.
Let me re-test the sieve before releasing it. I have to dust it off. OTOH, it is easily reconstructed from its description above. | |
|
Yves GallotVolunteer developer Project scientist Send message
Joined: 19 Aug 12 Posts: 669 ID: 164101 Credit: 305,042,960 RAC: 0

|
UTM has some numbers that can be double-checked with Cyclo.
http://primes.utm.edu/primes/search.php?Description=Phi%28%2532768%25&OnList=all&Number=9999 *
http://primes.utm.edu/primes/search.php?Description=Phi%28%2516384%25&OnList=all&Number=9999
I have been checking these numbers (on a slow GeForce GT 740M): everything is fine with an amazing study on the "B limits"...
13325^65536 - 13325^32768 + 1 is a probable prime. (380.8 sec., err=1.11e-004)
25719^65536 - 25719^32768 + 1 is a probable prime. (406.3 sec., err=4.12e-004)
29906^65536 - 29906^32768 + 1 is a probable prime. (411.5 sec., err=3.28e-004)
7726^32768 - 7726^16384 + 1 is a probable prime. (93.4 sec., err=1.41e-005)
13510^32768 - 13510^16384 + 1 is a probable prime. (97.7 sec., err=4.41e-005)
24135^32768 - 24135^16384 + 1 is a probable prime. (103.9 sec., err=2.90e-004)
35822^32768 - 35822^16384 + 1 is a probable prime. (106.6 sec., err=3.05e-004)
96280^32768 - 96280^16384 + 1 is a probable prime. (116.7 sec., err=2.27e-003)
137683^32768 - 137683^16384 + 1 is a probable prime. (120.8 sec., err=8.30e-003)
203097^32768 - 203097^16384 + 1 is a probable prime. (123.5 sec., err=1.66e-002)
219682^32768 - 219682^16384 + 1 is a probable prime. (126.5 sec., err=1.10e-002)
240513^32768 - 240513^16384 + 1 is a probable prime. (125.3 sec., err=2.93e-002)
241074^32768 - 241074^16384 + 1 is a probable prime. (126.0 sec., err=1.37e-002)
263458^32768 - 263458^16384 + 1 is a probable prime. (127.1 sec., err=1.56e-002)
297244^32768 - 297244^16384 + 1 is a probable prime. (128.3 sec., err=2.03e-002)
307866^32768 - 307866^16384 + 1 is a probable prime. (128.2 sec., err=2.22e-002)
317790^32768 - 317790^16384 + 1 is a probable prime. (128.3 sec., err=2.44e-002)
326040^32768 - 326040^16384 + 1 is a probable prime. (128.4 sec., err=2.54e-002)
347458^32768 - 347458^16384 + 1 is a probable prime. (130.0 sec., err=2.78e-002)
350159^32768 - 350159^16384 + 1 is a probable prime. (130.1 sec., err=7.42e-002)
352694^32768 - 352694^16384 + 1 is a probable prime. (130.2 sec., err=3.03e-002)
357238^32768 - 357238^16384 + 1 is a probable prime. (129.1 sec., err=2.94e-002)
358446^32768 - 358446^16384 + 1 is a probable prime. (129.2 sec., err=3.03e-002)
377716^32768 - 377716^16384 + 1 is a probable prime. (129.3 sec., err=3.22e-002)
415159^32768 - 415159^16384 + 1 is a probable prime. (131.3 sec., err=7.08e-002)
473198^32768 - 473198^16384 + 1 is a probable prime. (132.5 sec., err=5.13e-002)
494093^32768 - 494093^16384 + 1 is a probable prime. (133.5 sec., err=9.96e-002)
559738^32768 - 559738^16384 + 1 is a probable prime. (135.1 sec., err=7.28e-002)
571538^32768 - 571538^16384 + 1 is a probable prime. (135.8 sec., err=7.81e-002)
582706^32768 - 582706^16384 + 1 is a probable prime. (134.5 sec., err=7.86e-002)
586426^32768 - 586426^16384 + 1 is a probable prime. (134.2 sec., err=7.81e-002)
589145^32768 - 589145^16384 + 1 is a probable prime. (134.9 sec., err=1.37e-001)
590124^32768 - 590124^16384 + 1 is a probable prime. (134.4 sec., err=8.20e-002)
595806^32768 - 595806^16384 + 1 is a probable prime. (135.4 sec., err=8.11e-002)
604003^32768 - 604003^16384 + 1 is a probable prime. (134.8 sec., err=1.66e-001)
610367^32768 - 610367^16384 + 1 is a probable prime. (134.9 sec., err=1.72e-001)
621973^32768 - 621973^16384 + 1 is a probable prime. (134.8 sec., err=2.27e-001)
647715^32768 - 647715^16384 + 1 is a probable prime. (135.7 sec., err=2.19e-001)
657858^32768 - 657858^16384 + 1 is a probable prime. (135.4 sec., err=1.02e-001)
669646^32768 - 669646^16384 + 1 is a probable prime. (135.5 sec., err=1.02e-001)
672996^32768 - 672996^16384 + 1 is a probable prime. (135.6 sec., err=1.09e-001)
681101^32768 - 681101^16384 + 1 is a probable prime. (135.8 sec., err=2.05e-001)
691650^32768 - 691650^16384 + 1 is a probable prime. (135.9 sec., err=1.15e-001)
737869^32768 - 737869^16384 + 1 is a probable prime. (136.5 sec., err=2.03e-001)
756916^32768 - 756916^16384 + 1 is a probable prime. (136.7 sec., err=1.31e-001)
772447^32768 - 772447^16384 + 1 is a probable prime. (136.9 sec., err=2.48e-001)
796191^32768 - 796191^16384 + 1 is a probable prime. (137.5 sec., err=2.19e-001)
808691^32768 - 808691^16384 + 1 is a probable prime. (138.6 sec., err=2.73e-001)
870765^32768 - 870765^16384 + 1 is a probable prime. (139.4 sec., err=2.91e-001)
872302^32768 - 872302^16384 + 1 is a probable prime. (145.9 sec., err=1.88e-001)
911498^32768 - 911498^16384 + 1 is a probable prime. (141.1 sec., err=2.11e-001)
932333^32768 - 932333^16384 + 1 is a probable prime. (141.3 sec., err=3.91e-001)
934486^32768 - 934486^16384 + 1 is a probable prime. (142.2 sec., err=2.07e-001)
953686^32768 - 953686^16384 + 1 is a probable prime. (139.6 sec., err=2.07e-001)
970312^32768 - 970312^16384 + 1 is a probable prime. (141.9 sec., err=2.23e-001)
991445^32768 - 991445^16384 + 1 is a probable prime. (140.7 sec., err=4.38e-001)
991824^32768 - 991824^16384 + 1 is a probable prime. (141.0 sec., err=2.34e-001)
1003271^32768 - 1003271^16384 + 1 is composite [Res=16457391000]. (143.1 sec., err=5.00e-001)
1007934^32768 - 1007934^16384 + 1 is a probable prime. (140.7 sec., err=2.38e-001)
1019849^32768 - 1019849^16384 + 1 is composite [Res=16716944998]. (142.4 sec., err=4.69e-001)
1034698^32768 - 1034698^16384 + 1 is a probable prime. (142.0 sec., err=2.42e-001)
1052811^32768 - 1052811^16384 + 1 is a probable prime. (141.3 sec., err=4.53e-001)
1063662^32768 - 1063662^16384 + 1 is a probable prime. (142.1 sec., err=2.73e-001)
1079569^32768 - 1079569^16384 + 1 is composite [Res=17703641544]. (141.4 sec., err=5.00e-001)
1098136^32768 - 1098136^16384 + 1 is a probable prime. (140.7 sec., err=3.05e-001)
1129153^32768 - 1129153^16384 + 1 is composite [Res=18431381074]. (140.2 sec., err=5.00e-001)
1138316^32768 - 1138316^16384 + 1 is a probable prime. (141.7 sec., err=3.05e-001)
1148089^32768 - 1148089^16384 + 1 is a probable prime. (141.7 sec., err=5.00e-001)
1203036^32768 - 1203036^16384 + 1 is a probable prime. (140.9 sec., err=3.36e-001)
1218494^32768 - 1218494^16384 + 1 is a probable prime. (141.5 sec., err=3.83e-001)
1249815^32768 - 1249815^16384 + 1 is composite [Res=20493013835]. (142.5 sec., err=5.00e-001)
1261293^32768 - 1261293^16384 + 1 is composite [Res=20564118696]. (141.5 sec., err=5.00e-001)
1275383^32768 - 1275383^16384 + 1 is composite [Res=20881184908]. (141.8 sec., err=5.00e-001)
1276943^32768 - 1276943^16384 + 1 is composite [Res=21023864744]. (141.8 sec., err=5.00e-001)
1287328^32768 - 1287328^16384 + 1 is a probable prime. (142.9 sec., err=3.91e-001)
1303833^32768 - 1303833^16384 + 1 is composite [Res=21326152489]. (143.2 sec., err=5.00e-001)
1309000^32768 - 1309000^16384 + 1 is a probable prime. (143.5 sec., err=3.91e-001)
1335473^32768 - 1335473^16384 + 1 is composite [Res=21881106281]. (143.3 sec., err=5.00e-001)
1362748^32768 - 1362748^16384 + 1 is a probable prime. (142.8 sec., err=4.38e-001)
1400719^32768 - 1400719^16384 + 1 is composite [Res=22933239461]. (144.3 sec., err=5.00e-001)
1413863^32768 - 1413863^16384 + 1 is composite [Res=23122923892]. (143.2 sec., err=5.00e-001)
1464219^32768 - 1464219^16384 + 1 is composite [Res=24020445182]. (145.0 sec., err=5.00e-001)
1505290^32768 - 1505290^16384 + 1 is composite [Res=24670976862]. (145.3 sec., err=5.00e-001)
| |
|
serge  Send message
Joined: 21 Jun 12 Posts: 112 ID: 144858 Credit: 257,402,313 RAC: 98,569
                    
|
|
There is the fifth of this size ("your" n=16; "my" m=2^15; "PIES" n=196608 *) added today:
http://primes.utm.edu/primes/search.php?Description=Phi%28%2532768%25&OnList=all&Number=9999.
(before you ask, two more were not eligible to enter the database -- too small for top5000 and for top20 in this class, -- but they are listed in the comment to the third smallest )
I asked C.C. to add the "Cyclo" program code. And I kept PIES for this prime, because it seems that it was known to PIES but never reported (but I later figured out that it is a simple coincidence. Here is why. Both "PIES" n=196608 and 98304 have exactly 2 primes in b<20,000 interval, 2 more in 20,000<b<=40,000 interval, and 1 in 80,000<b<=100,000 interval. A simple coincidence. All n=98304 were indeed reported in 2004-2005; that is your n=15)
So far, so good. I will move on to the next power of two now... In fact I had a large head start last summer for (your) n=17; not a single one yet had been found.
__________________
*PIES ten years ago used the n that makes for the Phi_n(b), which is basically 6 times "my" m.
I use (similar to UTM standardized format), the Phi(3,-b^m) form.
You use the n for your expression is b^{2^n} - b^{2^{n-1}} + 1. So, m=2^{n-1}. | |
|
serge  Send message
Joined: 21 Jun 12 Posts: 112 ID: 144858 Credit: 257,402,313 RAC: 98,569
                    
|
|
Some ideas for version 0.2 (some of them trivial and likely on Yves' roadmap anyway):
1. Expose setPlatform() and setDevice() interfaces to command-line options -p and -d (for those who have multi-GPU systems; I've already rigged my binaries)
2. If base b is very small (b<1000), internally square it (maybe repeatedly) until it reaches reasonable size (e.g. <1000000) and halve the n each time. This will lead to smaller FFT size and much faster run time (but the test number obviously is still the same).
3. Port the binary savefiles, .ckpt files, maybe .ini files' mechanism from the geneferOCL code. Currently if you kill the program and restart, it will start from the top of the input file (so currently, instead, you can find the last state from Cyclo.log file and shorten the input file accordingly).
3a. Alternatively (like mfaktc): the finished worklines can be yanked from the input file and in the end it will be empty; with this option, re-open (and lock) the input file each time you need a line -- the user may have a) added to the end of it some more workunits or b) deleted some or masked with "#" (e.g. if they were eliminated by the sieve that runs in parallel elsewhere).
Just my 2 cents. | |
|
RogerVolunteer developer Volunteer tester
 Send message
Joined: 27 Nov 11 Posts: 1138 ID: 120786 Credit: 268,621,444 RAC: 21
                    
|
|
Also runs fine on my AMD HD 7970 GPU (with AMD X6 1100 CPU).
>CycloOCL.exe -t
Cyclo (OpenCL, v0.1), Copyright (C) 2014-15, Yves Gallot.
2^64 - 2^32 + 1 is a probable prime. (1.6 sec., err=8.88e-015)
5^128 - 5^64 + 1 is a probable prime. (1.2 sec., err=1.32e-013)
196^256 - 196^128 + 1 is a probable prime. (1.3 sec., err=2.91e-010)
14^512 - 14^256 + 1 is a probable prime. (1.3 sec., err=2.50e-012)
129^1024 - 129^512 + 1 is a probable prime. (1.6 sec., err=8.15e-010)
424^2048 - 424^1024 + 1 is a probable prime. (2.1 sec., err=6.29e-009)
484^4096 - 484^2048 + 1 is a probable prime. (3.2 sec., err=1.26e-008)
22^8192 - 22^4096 + 1 is a probable prime. (3.3 sec., err=4.32e-011)
10000120^64 - 10000120^32 + 1 is a probable prime. (1.3 sec., err=2.58e-001)
7000009^128 - 7000009^64 + 1 is a probable prime. (1.4 sec., err=3.75e-001)
5000349^256 - 5000349^128 + 1 is a probable prime. (1.6 sec., err=3.75e-001)
4000414^512 - 4000414^256 + 1 is a probable prime. (1.8 sec., err=2.19e-001)
3001210^1024 - 3001210^512 + 1 is a probable prime. (2.5 sec., err=1.88e-001)
>CycloOCL.exe -b
Cyclo (OpenCL, v0.1), Copyright (C) 2014-15, Yves Gallot.
2199064^8192 - 2199064^8192 + 1 Time: 53.8 us / mul. Err : 0.4688 51956 digits
1798620^16384 - 1798620^16384 + 1 Time: 63 us / mul. Err : 0.4063 102481 digits
1471094^32768 - 1471094^32768 + 1 Time: 64.1 us / mul. Err : 0.4375 202102 digits
1203210^65536 - 1203210^65536 + 1 Time: 93.5 us / mul. Err : 0.4336 398482 digits
984108^131072 - 984108^131072 + 1 Time: 142 us / mul. Err : 0.4375 785521 digits
804904^262144 - 804904^262144 + 1 Time: 264 us / mul. Err : 0.4375 1548156 digits
658332^524288 - 658332^524288 + 1 Time: 469 us / mul. Err : 0.4141 3050541 digits
538452^1048576 - 538452^1048576 + 1 Time: 938 us / mul. Err : 0.4102 6009544 digits
440400^2097152 - 440400^2097152 + 1 Time: 1.72 ms / mul. Err : 0.4453 11836006 digits
360204^4194304 - 360204^4194304 + 1 Time: 3.75 ms / mul. Err : 0.4111 23305854 digits
294612^8388608 - 294612^8388608 + 1 Time: 7.5 ms / mul. Err : 0.4063 45879398 digits
Currently you get the help if you don't give any command-line options. You should also add a -h to do the same thing. | |
|
Honza Volunteer moderator Volunteer tester Project scientist Send message
Joined: 15 Aug 05 Posts: 1905 ID: 352 Credit: 4,055,261,539 RAC: 4,529,805
                                 
|
2. If base b is very small (b<1000), internally square it (maybe repeatedly) until it reaches reasonable size (e.g. <1000000) and halve the n each time. This will lead to smaller FFT size and much faster run time (but the test number obviously is still the same).
...until it reaches reasonable but safe size (beware of b limit)
All good sugestions.
____________
My stats
Badge score: 1*1 + 5*1 + 8*3 + 9*11 + 10*1 + 11*1 + 12*3 = 186 | |
|
Yves GallotVolunteer developer Project scientist Send message
Joined: 19 Aug 12 Posts: 669 ID: 164101 Credit: 305,042,960 RAC: 0

|
Some ideas for version 0.2 (some of them trivial and likely on Yves' roadmap anyway):
You can prioritize them.
2. If base b is very small (b<1000), internally square it (maybe repeatedly) until it reaches reasonable size (e.g. <1000000) and halve the n each time. This will lead to smaller FFT size and much faster run time (but the test number obviously is still the same).
With an option, but not the default mode. I think that it can be useful to "double-check" small b's with two different computations (b and b^2). People can start the list at b=1000 if they want.
The maxErr is a very complicated function (see http://www.primegrid.com/forum_thread.php?id=5830&nowrap=true#78640).
An external analysis is necessary, the program cannot compute it quickly. And it depends on your goal: if you want to find all primes, you can select bMax=900000 for N=32768 but if you want to find some primes, bMax=1400000 is a reasonable bound.
If a new range is tested, the record of all maxErr and the curve of its values would provide very interesting information.
3a. Alternatively (like mfaktc): the finished worklines can be yanked [...]
It seems a better solution then genefer's .ini marker.
I'm rewriting the interface because genefer code is now an old-fashioned C code. Then we can choose the best options/interface of other programs.
All suggestions are welcome!
I'm going to update the usage with all options (including those that are not yet implemented). | |
|
serge  Send message
Joined: 21 Jun 12 Posts: 112 ID: 144858 Credit: 257,402,313 RAC: 98,569
                    
|
|
Second prime found with Cyclo! It most likely extends the OEIS sequence (I am now checking all stragglers below it).
When I mentioned the head start, I referred to already searched region 2 <= b <= 75,000. This was done last summer with modified LLR (I, too, use a trick, which is using FFT mod b^{3*2^{n-1}} + 1 which is only 1.5 large in log-size but uses the straight, non-padded FFT and is very fast; the last step is mod N, where N is the number under test; obviously, N | b^{3*2^{n-1}} + 1).
Now, on to the next power of two for me. :-0 | |
|
serge  Send message
Joined: 21 Jun 12 Posts: 112 ID: 144858 Credit: 257,402,313 RAC: 98,569
                    
|
|
In regards to sieve, we may want to ask David Underbakke to modify AthGFNSieve for this form. It would have almost all building blocks already implemented, just some modifications: it can sieve for b^{3*2^{n-1}} + 1 but then exclude factors of b^{2^{n-1}} + 1. The math and internal logic (Calculate the first primitive root; Derive the rest; Filter) would remain the same.
Or even simpler, just allow for n to be 3-smooth (and check all internal logic if something depends on n being only powers of 2) and add option to report all factors (including small and multiple factors per b); then, the rest can be done with external scripts. Note: the fact that x^2-x+1 and x+1 are coprime helps; in other words, they cannot have both the same factor > 3, so you can boldly subtract one list from another.
Ideally it should be kept under the same brand name and added as an option - then, it will be easier to rebuild all binaries for PrimeGrid and distribute the sieving for this form for all 16<=n<=22. | |
|
serge  Send message
Joined: 21 Jun 12 Posts: 112 ID: 144858 Credit: 257,402,313 RAC: 98,569
                    
|
|
... Actually, Anand axn's gfn-sieve would be the way to go. | |
|
Neo Volunteer tester
 Send message
Joined: 28 Oct 10 Posts: 710 ID: 71509 Credit: 91,178,992 RAC: 0
                   
|
|
I wish you rocket scientists would put this all together so the rest of us can crunch...
(of course, after the Year of the Sheep Challenge..)
Neo
AtP
____________
| |
|
Yves GallotVolunteer developer Project scientist Send message
Joined: 19 Aug 12 Posts: 669 ID: 164101 Credit: 305,042,960 RAC: 0

|
[...] The math and internal logic (Calculate the first primitive root; Derive the rest; Filter) would remain the same.
[...]... Actually, Anand axn's gfn-sieve would be the way to go.
I don't remember Phil Carmody's algorithm for sieving (calculate a primitive root, etc.) and I don't see this sort of computation in Anand axn's gfn-sieve...?
What is the fastest method for sieving a cyclotomic polynomial?
Is there somewhere a simple C code (without tricky optimisations) that implements it?
Would a P-1 factoring stage be efficient?
Who is going to write the sieve? Serge? Should we ask to Anand Nair?
I can help, but first I should understand the basic algorithm...
Thanks, Yves | |
|
axnVolunteer developer Send message
Joined: 29 Dec 07 Posts: 285 ID: 16874 Credit: 28,027,106 RAC: 0
            
|
|
GFN Sieve algorithm - http://fatphil.org/maths/GFN/maths.html
My sieve pretty much follows it (but uses jacobi symbol to avoid guessing which starting point will yield a primitive root)
I have already adapted the GFN sieve for Cyclo. Will need some more testing before releasing it. However, the sieve approach requires coordination. It proceeds thru primes much slower than individual candidate trial factoring, so for independent testers, it is best to stick with trial factoring (I believe Serge has working code for that). | |
|
Yves GallotVolunteer developer Project scientist Send message
Joined: 19 Aug 12 Posts: 669 ID: 164101 Credit: 305,042,960 RAC: 0

|
I have already adapted the GFN sieve for Cyclo.
That's good news, thanks!
| |
|
serge  Send message
Joined: 21 Jun 12 Posts: 112 ID: 144858 Credit: 257,402,313 RAC: 98,569
                    
|
|
Anand shared his alpha build (on MForum); it works great (on Windows)!
He may want to tweak the cubic non-residue trial limit a bit higher, recompile with hardwired limit of 100M, and it appears practically ready for consumption.
Just like with GFN-sieve, same workunit framework to be established.
The linux binary remained elusive (the same as with GFN-sieve).
The 0-1P (and maybe 1-10P) range has to be done by admins, or else the output files will be enormous for any given N. | |
|
Yves GallotVolunteer developer Project scientist Send message
Joined: 19 Aug 12 Posts: 669 ID: 164101 Credit: 305,042,960 RAC: 0

|
|
A new version of "Cyclo" is available at
http://yves.gallot.pagesperso-orange.fr/Cyclo/
Slightly faster, it reads/writes .ckpt files and is able to continue if an input file is checked.
The current line is tagged with *: you can modify the input file during the computation.
Device number can be set with the -d option.
TODO:
- trap ctrl-C
- set priority
What else is needed for it to run with PRPNet?
| |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
A new version of "Cyclo" is available at
http://yves.gallot.pagesperso-orange.fr/Cyclo/
Slightly faster, it reads/writes .ckpt files and is able to continue if an input file is checked.
The current line is tagged with *: you can modify the input file during the computation.
Device number can be set with the -d option.
TODO:
- trap ctrl-C
- set priority
What else is needed for it to run with PRPNet?
It will need -V, and the PRPNet server and client need to be modified. It has no support for this numerical form or the executable.
____________
My lucky number is 75898524288+1 | |
|
rogueVolunteer developer
 Send message
Joined: 8 Sep 07 Posts: 1221 ID: 12001 Credit: 18,565,548 RAC: 0
 
|
|
I can work on changes to PRPNet. If someone could provide to me an ABC file with candidates to test and an example of cycle input and output, that would be great. | |
|
Yves GallotVolunteer developer Project scientist Send message
Joined: 19 Aug 12 Posts: 669 ID: 164101 Credit: 305,042,960 RAC: 0

|
I can work on changes to PRPNet. If someone could provide to me an ABC file with candidates to test and an example of cycle input and output, that would be great.
Cyclo interface is very similar to the genefer one:
Usage: CycloOCL [options]
Options:
-h Print this help message, the OpenCL device list and exit,
-b Run benchmark,
-t Run some tests of known primes,
-q "b^N - b^{N/2} + 1" Check 'q'uick expression (N must be a power of two),
<filename> Test numbers in <filename>, one per line, in the format b N,
-d <n> Set device number = n (default is 0),
-v Print the startup banner and immediately exit.
You can use a "trick" with -q option. It is sufficient to write
CycloOCL.exe -q "129^1024" and the program checks 129^1024 - 129^512 + 1.
You can also write CycloOCL.exe -q "129^1024+1".
Then I think that PRPNet <-> genefer interface can be used as is, just replacing "genefer.exe" with "CycloOCL.exe".
Note that the options should have a lowercase letter: -h, -q, -v is OK but -H, -Q, -V is NOK.
If uppercase or lowercase letters should be supported, I can quicly add this feature. | |
|
rogueVolunteer developer
 Send message
Joined: 8 Sep 07 Posts: 1221 ID: 12001 Credit: 18,565,548 RAC: 0
 
|
I can work on changes to PRPNet. If someone could provide to me an ABC file with candidates to test and an example of cycle input and output, that would be great.
Cyclo interface is very similar to the genefer one:
Usage: CycloOCL [options]
Options:
-h Print this help message, the OpenCL device list and exit,
-b Run benchmark,
-t Run some tests of known primes,
-q "b^N - b^{N/2} + 1" Check 'q'uick expression (N must be a power of two),
<filename> Test numbers in <filename>, one per line, in the format b N,
-d <n> Set device number = n (default is 0),
-v Print the startup banner and immediately exit.
You can use a "trick" with -q option. It is sufficient to write
CycloOCL.exe -q "129^1024" and the program checks 129^1024 - 129^512 + 1.
You can also write CycloOCL.exe -q "129^1024+1".
Then I think that PRPNet <-> genefer interface can be used as is, just replacing "genefer.exe" with "CycloOCL.exe".
Note that the options should have a lowercase letter: -h, -q, -v is OK but -H, -Q, -V is NOK.
If uppercase or lowercase letters should be supported, I can quicly add this feature.
Thanks. I downloaded the source code and figured that out. Now I just need to know what the ABC file will look like so I can load a server with work. The rest of the changes are done and waiting to be tested. | |
|
JimB Honorary cruncher Send message
Joined: 4 Aug 11 Posts: 916 ID: 107307 Credit: 974,532,191 RAC: 0
                    
|
|
Wouldn't one possible ABC header just be:
ABC $a^$b-$a^($b/2)+1
followed by a pair of b N on each line? That's how most of these things work.
Whether programs like srfile would be compatible with that, I don't know. We can always work around that if needed. | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
|
I guess it's time to start thinking of how we move forward with this.
The first question is "Which n do you want to start testing?"
That question is rather important, because axn's GFN sieve program is very fast at higher n's (n=19 and above), but slows down significantly at lower n's. That may be fixable, but at least for right now, I would guess that it won't be that fast if we want to start Cyclo testing at n=15 or lower.
A second question refers to "the admins may need top seive 0-1P (or 10P) themselves." Is that because of the large factor files produced, or because the GPU sieve can't handle low P's? If it can't do it, what other software do we have that can?
It sounds like we're really close to having Cyclo ready for running on PRPnet, but do we want/need to start without sieving first?
____________
My lucky number is 75898524288+1 | |
|
Honza Volunteer moderator Volunteer tester Project scientist Send message
Joined: 15 Aug 05 Posts: 1905 ID: 352 Credit: 4,055,261,539 RAC: 4,529,805
                                 
|
The first question is "Which n do you want to start testing?"
That question is rather important, because axn's GFN sieve program is very fast at higher n's (n=19 and above), but slows down significantly at lower n's. That may be fixable, but at least for right now, I would guess that it won't be that fast if we want to start Cyclo testing at n=15 or lower.
Would Top5k be the target?
A second question refers to "the admins may need top seive 0-1P (or 10P) themselves." Is that because of the large factor files produced, or because the GPU sieve can't handle low P's? If it can't do it, what other software do we have that can?
I started most Genefer ranges on CPUs locally. There is no need for GPU app for low P (if it takes hours to make is running there)
Using CPU app offline to start sieves and GPU to split ranges if fine.
It sounds like we're really close to having Cyclo ready for running on PRPnet, but do we want/need to start without sieving first?
With low n to get things moving while working on sieve app is fine.
On the other hand, there is no rush so if we want to start with sieve app first, is OK as well.
____________
My stats
Badge score: 1*1 + 5*1 + 8*3 + 9*11 + 10*1 + 11*1 + 12*3 = 186 | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
A second question refers to "the admins may need top seive 0-1P (or 10P) themselves." Is that because of the large factor files produced, or because the GPU sieve can't handle low P's? If it can't do it, what other software do we have that can?
I started most Genefer ranges on CPUs locally. There is no need for GPU app for low P (if it takes hours to make is running there)
Using CPU app offline to start sieves and GPU to split ranges if fine.
It isn't clear to me if a CPU sieve for Cyclo exits.
____________
My lucky number is 75898524288+1 | |
|
|
|
The small list
2^2 - 2^1 + 1
2^4 - 2^2 + 1
2^8 - 2^4 + 1
5^16 - 5^8 + 1
4^32 - 4^16 + 1
2^64 - 2^32 + 1
5^128 - 5^64 + 1
196^256 - 196^128 + 1
14^512 - 14^256 + 1
129^1024 - 129^512 + 1
424^2048 - 424^1024 + 1
484^4096 - 484^2048 + 1
22^8192 - 22^4096 + 1
should be completed...
Yves
OEIS has A246119 so apparently the list continues:
5164^16384 - 5164^8192 + 1
7726^32768 - 7726^16384 + 1
13325^65536 - 13325^32768 + 1
Note that what is called n in that OEIS entry corresponds to n-1 in this thread.
Now I just realize that serge already said all this (even linked A246119) in his posts above, so I am being redundant here.
/JeppeSN
| |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
|
If possible, might I suggest starting a PRPNet port with a single n large enough so the numbers are eligible for the Top 5K list? If we do that before February 1st, people could crunch it for Tour de Primes. It might be worth doing that even without sieving. That would give folks something fast to crunch with a GPU for TDP.
Mark, how does double checking in PRPNet work? Since this is a new project, I'd like to give it a try. Can't really try it on existing ports because (I think) the server would immediately want to double check every single completed task in the database.
And speaking of size, is the formula for computing the number of digits the same for cyclo as it is for GFN? The part that gets subtracted out is so much smaller that it shouldn't affect the size at all right? It's insignificant in that regard. Or am I missing something?
____________
My lucky number is 75898524288+1 | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
Cyclo (OpenCL, v0.2), Copyright (C) 2014-15, Yves Gallot.
Running on platform 'NVIDIA CUDA', device 'GeForce GTX 580', version 'OpenCL 1.1 CUDA' and driver '344.75'.
2^64 - 2^32 + 1 is a probable prime. (0.1 sec., err=7.99e-015, 20 digits)
5^128 - 5^64 + 1 is a probable prime. (0.0 sec., err=9.95e-014, 90 digits)
196^256 - 196^128 + 1 is a probable prime. (0.1 sec., err=2.33e-010, 587 digits)
14^512 - 14^256 + 1 is a probable prime. (0.1 sec., err=1.88e-012, 587 digits)
129^1024 - 129^512 + 1 is a probable prime. (0.3 sec., err=6.98e-010, 2162 digits)
424^2048 - 424^1024 + 1 is a probable prime. (0.5 sec., err=5.12e-009, 5381 digits)
484^4096 - 484^2048 + 1 is a probable prime. (1.0 sec., err=1.07e-008, 10998 digits)
22^8192 - 22^4096 + 1 is a probable prime. (1.0 sec., err=3.59e-011, 10998 digits)
5164^16384 - 5164^8192 + 1 is a probable prime. (6.3 sec., err=3.22e-006, 60834 digits)
7726^32768 - 7726^16384 + 1 is a probable prime. (17.9 sec., err=1.19e-005, 127401 digits)
13325^65536 - 13325^32768 + 1 is a probable prime. (73.0 sec., err=9.25e-005, 270315 digits)
96873^131072 - 96873^65536 + 1 is a probable prime. (368.8 sec., err=1.02e-002, 653552 digits)
10000120^64 - 10000120^32 + 1 is a probable prime. (0.1 sec., err=2.03e-001, 449 digits)
7000009^128 - 7000009^64 + 1 is a probable prime. (0.1 sec., err=3.28e-001, 877 digits)
5000349^256 - 5000349^128 + 1 is a probable prime. (0.2 sec., err=4.84e-001, 1715 digits)
4000414^512 - 4000414^256 + 1 is a probable prime. (0.3 sec., err=1.68e-001, 3381 digits)
3200056^1024 - 3200056^512 + 1 is a probable prime. (0.7 sec., err=1.80e-001, 6662 digits)
2505769^2048 - 2505769^1024 + 1 is a probable prime. (1.1 sec., err=3.13e-001, 13106 digits)
2005838^4096 - 2005838^2048 + 1 is a probable prime. (2.1 sec., err=1.88e-001, 25815 digits)
1805064^8192 - 1805064^4096 + 1 is a probable prime. (4.3 sec., err=2.73e-001, 51254 digits)
1401068^16384 - 1401068^8192 + 1 is a probable prime. (10.3 sec., err=2.46e-001, 100704 digits)
1007934^32768 - 1007934^16384 + 1 is a probable prime. (27.4 sec., err=2.22e-001, 196721 digits)
93500^65536 - 93500^32768 + 1 is a probable prime. (87.8 sec., err=2.53e-003, 325768 digits)
How high can maxErr go before it becomes a problem?
Also, I ran 1000^65536 and 1002^65536. The residues don't look like the normal 16 hex digits we normally see. And 1000^65536 ran in 0.1 seconds. Is this correct:
C:\Temp\Cyclo>Cycloocl -q "1000^65536
Cyclo (OpenCL, v0.2), Copyright (C) 2014-15, Yves Gallot.
Running on platform 'NVIDIA CUDA', device 'GeForce GTX 580', version 'OpenCL 1.1 CUDA' and driver '344.75'.
1000^65536 - 1000^32768 + 1 is composite [Res=3]. (0.1 sec., err=0.00e+000)
C:\Temp\Cyclo>Cycloocl -q "1002^65536
Cyclo (OpenCL, v0.2), Copyright (C) 2014-15, Yves Gallot.
Running on platform 'NVIDIA CUDA', device 'GeForce GTX 580', version 'OpenCL 1.1 CUDA' and driver '344.75'.
1002^65536 - 1002^32768 + 1 is composite [Res=32796769]. (53.4 sec., err=2.91e-007)
____________
My lucky number is 75898524288+1 | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
C:\Temp\Cyclo>Cycloocl -q "1000^65536
Cyclo (OpenCL, v0.2), Copyright (C) 2014-15, Yves Gallot.
Running on platform 'NVIDIA CUDA', device 'GeForce GTX 580', version 'OpenCL 1.1 CUDA' and driver '344.75'.
1000^65536 - 1000^32768 + 1 is composite [Res=3]. (0.1 sec., err=0.00e+000)
I'm not able to reproduce this behavior. This is what I get when I try it again:
C:\Temp\Cyclo>Cycloocl -q "1000^65536
Cyclo (OpenCL, v0.2), Copyright (C) 2014-15, Yves Gallot.
Running on platform 'NVIDIA CUDA', device 'GeForce GTX 580', version 'OpenCL 1.1 CUDA' and driver '344.75'.
1000^65536 - 1000^32768 + 1 is composite [Res=32745926]. (53.4 sec., err=3.20e-007)
____________
My lucky number is 75898524288+1 | |
|
serge  Send message
Joined: 21 Jun 12 Posts: 112 ID: 144858 Credit: 257,402,313 RAC: 98,569
                    
|
|
One project that could already be started is the sieve. n=18, 19 and 20 should be encouraged over n=21 and 22 (these will take much more time to pick up speed). n<=17 are too small for Top5k and can be left to individual searchers.
axn wrote a sieve (quite similar to GFNSvCUDA) which works very well and a few (minor) bugs were already removed. What's more, Anand seems to have figured out a way to make the linux binary work, as well.
So, a very similar framework should be set up at http://uwin.mine.nu/sieves/cyclo/ (a near identical clone of http://uwin.mine.nu/sieves/gfn/ )
and an edited version of these instructions should be written (just search-and-replace, mostly) | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
One project that could already be started is the sieve. n=18, 19 and 20 should be encouraged over n=21 and 22 (these will take much more time to pick up speed). n<=17 are too small for Top5k and can be left to individual searchers.
axn wrote a sieve (quite similar to GFNSvCUDA) which works very well and a few (minor) bugs were already removed. What's more, Anand seems to have figured out a way to make the linux binary work, as well.
So, a very similar framework should be set up at http://uwin.mine.nu/sieves/cyclo/ (a near identical clone of http://uwin.mine.nu/sieves/gfn/ )
and an edited version of these instructions should be written (just search-and-replace, mostly)
Serge, I see you have a few cyclotomic primes in the top 5K already. What ranges are you searching or have searched? n=17 seems like a good place to start, but you seem to have done some of it already. We don't want to both be searching the same space, I imagine.
Also, for Yves, what can we expect in terms of b limit? n=17 test are pretty quick and if this is popular we might blow through all of n=17 pretty quickly, even without sieving and with double checking turned on.
____________
My lucky number is 75898524288+1 | |
|
serge  Send message
Joined: 21 Jun 12 Posts: 112 ID: 144858 Credit: 257,402,313 RAC: 98,569
                    
|
|
I've been running similar searches since summer (and not only this flavor but also many 3-smooth exponents in place of 2^n); I was using a modified LLR for this, and I can share the patch if you will need a CPU client (it is much faster than LLR in $a^$b-$a-$c-1 mode). Because there are so many exponents to test, I later focused on just a few: powers of 2, powers of 3 and powers of 6.
For this particular subset (powers of 2), my current limits are:
for n=16, I have reached the b<=30,000 with cycLLR* (back in September; there were four primes in this range), and then I used a discontinuous search simply for the test of Cyclo and found the fifth prime at 93500;
for n=17, b<=96873 (my goal of extending OEIS A246119 is reached here, so I moved on to n=18);
for n=18, b<=80,000 and I currently run a farm of 25 EC2 nodes up to 150,000. I intend to extend OEIS here, too;
for n=19, only some low b values (b<<1000).
I have sieved n=18 to ~580P with axn's CycloSv (and my ad hoc sieve under 1P). It will need much more sieving (I can share sieve file but it's best to start again from scratch - and you will reach this limit within a day undoubtedly, then you can compare the two sieve files).
As for n=15, it seems to have been done very extensively and years before me - by P.I.E.S; the number of known primes for this n is very high.
P.S. n=17 is a good start. (I was off by one in the earlier message!)
And one can still run some n=16's, but it would be best then to immediately skip to a b value large enough to still enter Top5k and then work your way up fast before the 5000-th top prime size catches up! There should be a few recordable primes there, before too late. The magic b value would be
gp > exp(log(10)*366620/2^16)
%3 = 392805.2
...and growing every day (366620 is the current size of the 5000-th top prime)
_________
*I just made up this name; I never called that hacked version of LLR anything.
Basically, a PRP test (with a=3 for b=power of 2, and a=2 otherwise) is run using GWNUM FFT mod (b^3m + 1) and the last step is done mod (the number) | |
|
|
|
|
serge, this time I actually read your posts, and followed and tried to understand the links. Despite your modesty, I see you are the one person currently finding these record primes. From your own link to Top Twenty Generalized Unique one sees it; you are Serge Batalov.
Last month you found
Phi(3, - 96873^65536)
= (96873^65536)^2 - 96873^65536 + 1
= 96873^(2^17) - 96873^(2^16) + 1
so should we put 96873 into OEIS as A246119(16)? (Do you know 96873 is minimal for this exponent?)
For those of us who are not experts in cyclotomic polynomials Phi(n, x), all we need to remember here is that
Phi(3, x) = x^2 + x + 1
Phi(3, -x) = x^2 - x + 1
Phi(6, x) = x^2 - x + 1
Phi(3*2^n, x) = x^(2^n) - x^(2^{n-1}) + 1 = Phi(3, -x^(2^{n-1}))
/JeppeSN | |
|
serge  Send message
Joined: 21 Jun 12 Posts: 112 ID: 144858 Credit: 257,402,313 RAC: 98,569
                    
|
|
Yes, I edited OEIS wiki ...let's see... about three weeks ago. But the approval process there is a bit arcane. Some times you get approved fast and sometimes not. I think N.S. still puts the last stamp of approval. The edits were already reviewed on Jan 4-5-6. (OEIS Wiki has a edit-review-approve-publish process.)
I know a person (or more than one) who could approve/publish edits today, but I am not passionate about bothering them for trifles. The process will come through... maybe only in time for my "next term" edit. ;-) | |
|
Yves GallotVolunteer developer Project scientist Send message
Joined: 19 Aug 12 Posts: 669 ID: 164101 Credit: 305,042,960 RAC: 0

|
How high can maxErr go before it becomes a problem?
It's a complicated question, see
http://www.primegrid.com/forum_thread.php?id=6062&nowrap=true#81774
All candidates are prime.
Also, I ran 1000^65536 and 1002^65536. The residues don't look like the normal 16 hex digits we normally see. And 1000^65536 ran in 0.1 seconds.
You found a bug!
The program continued the computation from a checkpoint that was generated with different b and n. It may occur if you use the -q command, but not if the input is a file.
I'm going to fix it. | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
How high can maxErr go before it becomes a problem?
It's a complicated question, see
http://www.primegrid.com/forum_thread.php?id=6062&nowrap=true#81774
All candidates are prime.
Also, I ran 1000^65536 and 1002^65536. The residues don't look like the normal 16 hex digits we normally see. And 1000^65536 ran in 0.1 seconds.
You found a bug!
The program continued the computation from a checkpoint that was generated with different b and n. It may occur if you use the -q command, but not if the input is a file.
I'm going to fix it.
You are correct -- that run was right after terminating a different computation. I didn't realize it had tried to resume the other calculation because there's no message it's resuming from a file. hint hint :)
____________
My lucky number is 75898524288+1 | |
|
rogueVolunteer developer
 Send message
Joined: 8 Sep 07 Posts: 1221 ID: 12001 Credit: 18,565,548 RAC: 0
 
|
Mark, how does double checking in PRPNet work? Since this is a new project, I'd like to give it a try. Can't really try it on existing ports because (I think) the server would immediately want to double check every single completed task in the database.
There need to be two matching residues for the same candidate, typically done on different computers.
As for the ABC file, I would prefer:
ABC Phi($a,$b^$c)
and grouping over $a and $c for the stats. My reason for that is because it is much harder in code to identify a polynomial as a cyclotomic polynomial. I want PRPNet to support other values for $a and $c than just 3 and c=2^n. Those can be tested by pfgw. | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
Mark, how does double checking in PRPNet work? Since this is a new project, I'd like to give it a try. Can't really try it on existing ports because (I think) the server would immediately want to double check every single completed task in the database.
There need to be two matching residues for the same candidate, typically done on different computers.
As for the ABC file, I would prefer:
ABC Phi($a,$b^$c)
and grouping over $a and $c for the stats. My reason for that is because it is much harder in code to identify a polynomial as a cyclotomic polynomial. I want PRPNet to support other values for $a and $c than just 3 and c=2^n. Those can be tested by pfgw.
Just to be clear, Jim's suggestion of:
ABC $a^$b-$a^($b/2)+1
1234 65536
Would instead be: (note the minus sign before 1234)
ABC Phi($a,$b^$c)
3 -1234 32768
Is that correct?
Will the displays on the web pages show the Phi representation or the b^N-b^(N/2)+1 representation?
____________
My lucky number is 75898524288+1 | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
Would instead be: (note the minus sign before 1234)
ABC Phi($a,$b^$c)
3 -1234 32768
Is that correct?
Or would it be:
ABC Phi($a,-($b^$c))
3 1234 32768
____________
My lucky number is 75898524288+1 | |
|
serge  Send message
Joined: 21 Jun 12 Posts: 112 ID: 144858 Credit: 257,402,313 RAC: 98,569
                    
|
|
This form looks best (and UTM uses it)
ABC Phi($a,$b^$c)
3 -1234 32768
Primes with b>0 exist (if and only if c is a power of 3).
Note on semantics: $b in this convention should be expected to be inserted "as text" and only then evaluated (or else the sign will disappear upon being raised to the even $c power)
Yet another possibility to avoid the '-' sign is to use
ABC Phi($a,$b^$c)
6 1234 32768
This is equivalent, because Phi(3, -x) = Phi(6, x) = x^2 - x + 1.
And yet another (also equivalent, as long as a is 3-smooth) is
ABC Phi($a,$b)
98034 -1234
This one would be a complete revival of the P.I.E.S notation... | |
|
rogueVolunteer developer
 Send message
Joined: 8 Sep 07 Posts: 1221 ID: 12001 Credit: 18,565,548 RAC: 0
 
|
|
I'll support
ABC Phi($a,$b^$c)
and
ABC Phi($a,$b)
but for the latter the grouping would be over $a whereas the former has a the grouping by $a and $c.
pfgw treats the expression correctly when $b is negative. I verified that both Phi(3,-129^512) and Phi(6,126^512) are both PRP.
I'll change the PRPNet client to use cyclo if $a = 6 and $c is a power of 2, but raises the question of $b being positive or negative for cyclo. I should be able to figure that out on my own.
| |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
pfgw treats the expression correctly when $b is negative. I verified that both Phi(3,-129^512) and Phi(6,126^512) are both PRP.
I'm assuming that should be phi(6,129^512), correct?
In my opinion, it's cleaner to use
ABC Phi($a,$b^$c)
6 1234 32768
I'm not a fan of using a "-" that's treated as text. Everyone happy with that?
____________
My lucky number is 75898524288+1 | |
|
serge  Send message
Joined: 21 Jun 12 Posts: 112 ID: 144858 Credit: 257,402,313 RAC: 98,569
                    
|
|
Yes, this will be clean.
I will email my patch to Jean Penne (that will be geared to an input in this form), and maybe he will include it in the next release; then for the CPU client you will be able to use llr v.3.8.14+
I will probably include yet another patch in the same bottle. It deals with "Divides Phi($a^$b,2)"; some people found it useful (at least one more person). It's been sitting on my disk for a while. | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
Yes, this will be clean.
I will email my patch to Jean Penne (that will be geared to an input in this form), and maybe he will include it in the next release; then for the CPU client you will be able to use llr v.3.8.14+
I will probably include yet another patch in the same bottle. It deals with "Divides Phi($a^$b,2)"; some people found it useful (at least one more person). It's been sitting on my disk for a while.
I suspect that a CPU version of Cyclo might be significantly faster than LLR, in much the same way that Genefer is for GFNs.
____________
My lucky number is 75898524288+1 | |
|
serge  Send message
Joined: 21 Jun 12 Posts: 112 ID: 144858 Credit: 257,402,313 RAC: 98,569
                    
|
|
Yves mentioned that he has a CPU version, too, yes. I am sure that it will be faster for b^{2m} - b^m + 1 with m a power of 2 -- the transform size is smaller in ratio 2 : 3 (the fact that it is not a FF transform is not important for speed). EDIT: Actually, it would be very interesting to compare. cycLLR has the advantage of being linked to gwnum, while Cyclo's z-T needs custom assembly code (Yves may have written it, but if not and it is still in plain C, then gwnum possibly may pack a decent punch even with larger FFT length. And of course, not in the padded generic $a^$b-$a^$c+1 mode, but in mod(b^{3m}+1) mode).
The only advantage (cyc)LLR (temporarily) has is that you can test any 3-smooth powers m, as well as the positively signed b-form Phi(3^t,b), and Cyclo - not yet. axn said that the can upgrade the sieve for these forms, too. It is just like having FFT sizes in very early GWNUM to be only of powers-of-2 length, and in later version, having more (smooth-factored) lengths between them. Modern GWNUM has plenty.
The musical metaphor would be: being able to play with only one note "La" in octaves (that's only 8 keys out of the whole, say, 88-key keyboard) versus being able to play every key. (Those who went to music classes as kids probably know - this is for those who haven't: Octaves are powers of two, quite literally, in frequency. Other keys are in ratios 5:4, 3:2 etc. ... The violinists in the audience are rolling their eyes ;-) ..they are not bound to any fixed "keys", but the FFT coders and the keyboardists, unfortunately, are.)
I am sure that when Yves will extend Cyclo to all 3-smooth expos, there will be a storm of new primes, for a user of any compute capacity. For GFN and for current Cyclo, once we are done, say, with 262144 and move on to 524288 and later - to 1048576, and there will be ages between primes (We are still waiting for the first GFN1048576 prime, right?). But try to count how many 3-smooth numbers are between 524288 and 1048586? (left as an exercise) In one word, tons! And each of them has associated primes. | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
|
Thanks, serge, for the number theory tutorial. It's beginning to make sense.
For those (like me) confused about some of the nomenclature, Phi(3, x) is the same as x^2 + x +1 and Phi(6, x) is the same as x^2 - x +1. There's a Wikipedia page on cyclotomic polynomials here that explains where the 3 and 6 come from.
"3-smooth" means the number's factors consist of only twos and threes.
____________
My lucky number is 75898524288+1 | |
|
Yves GallotVolunteer developer Project scientist Send message
Joined: 19 Aug 12 Posts: 669 ID: 164101 Credit: 305,042,960 RAC: 0

|
I suspect that a CPU version of Cyclo might be significantly faster than LLR, in much the same way that Genefer is for GFNs.
Today, cyclo is as fast as genefer. Then the CPU version will be as fast as the CPU version of genefer (a CPU version is under way).
The main problem is the numerical precision. A reasonable estimate of the bound b_max is
b_max(cyclo) = 2/3 b_max(genefer). The reason is a single stage of the transform where the third root of unity is used rather than a 2^k-th root (genefer: Phi(2^n, x), cyclo: Phi(3*2^n, x)).
A generalisation of cyclo to all 3-smooth exponents may be inaccurate.
An example of the numerical precision problem is the Bruun's FFT. With a basic C code, we have:
Cooley-Tukey: 28234^4096+1 is a probable prime. (16.7 sec., err=3.05e-005)
z-Transform: 28234^4096+1 is a probable prime. (15.4 sec., err=2.19e-005)
Bruun: 28234^4096+1 is a probable prime. (7.8 sec., err=2.81e-001) The Bruun's transform is twice as fast as other transforms with GFN but it is not precise enough to be practical.
Of course the goal is all 3-smooth exponents (otherwise the program would not be called "cyclo"). But there are still some problems to solve before playing some other perfect fifth chords :o) | |
|
|
|
|
Since
Phi(3, -1234^32768)
certainly must mean
Phi(3, -(1234^32768))
and never
Phi(3, (-1234)^32768)
i.e. the negation is performed after the exponentiation, it would be confusing and error-prone to represent it as the three numbers (A, B, C):
3, -1234, 32768
It is better to use four "variables" instead:
3, -1, 1234, 32768
This can be avoided if we write Phi(6, 1234^32768) instead. However, for some reason, that does not seem to be the notation preferred by Caldwell's Prime Pages.
I do not know if we will ever benefit from the full generality of the expression Phi(A, B*C^D).
Disclaimer: I do not know how PRPNet or Yves's application are coded.
/JeppeSN | |
|
rogueVolunteer developer
 Send message
Joined: 8 Sep 07 Posts: 1221 ID: 12001 Credit: 18,565,548 RAC: 0
 
|
|
Last question (for now). It is easy to compute the decimal length for Phi(6,x) and Phi(3,x). Is there is generic formula for computing the decimal length of Phi(y,x) (where y is an integer as opposed to an expression)? | |
|
Yves GallotVolunteer developer Project scientist Send message
Joined: 19 Aug 12 Posts: 669 ID: 164101 Credit: 305,042,960 RAC: 0

|
Disclaimer: I do not know how PRPNet or Yves's application are coded.
Cyclo checks "Phi(3*2^n, b)" with n >= 1 (the polynomial is Phi(3*2^n, x) and we set x=b).
The target is to generalize it to the form "Phi(3^m*2^n, b)" with m >= 1 and n >= 0 (if m = 0 and n >= 1, the form is a GFN).
They are the cyclotomic polynomials for which a "N-1" primality test (Proth's theorem and its generalizations) can be applied. | |
|
Yves GallotVolunteer developer Project scientist Send message
Joined: 19 Aug 12 Posts: 669 ID: 164101 Credit: 305,042,960 RAC: 0

|
Last question (for now). It is easy to compute the decimal length for Phi(6,x) and Phi(3,x). Is there is generic formula for computing the decimal length of Phi(y,x) (where y is an integer as opposed to an expression)?
The degree of the n-th cyclotomic polynomial is \varphi(n) (the Euler's totient function).
Then Phi(n, x) ~ x^\varphi(n). | |
|
|
|
Disclaimer: I do not know how PRPNet or Yves's application are coded.
Cyclo checks "Phi(3*2^n, b)" with n >= 1 (the polynomial is Phi(3*2^n, x) and we set x=b).
The target is to generalize it to the form "Phi(3^m*2^n, b)" with m >= 1 and n >= 0 (if m = 0 and n >= 1, the form is a GFN).
They are the cyclotomic polynomials for which a "N-1" primality test (Proth's theorem and its generalizations) can be applied.
Great. As far as I can see, what you call
Phi(3^m*2^n, b)
would be called
Phi(3, -b^{3^(m-1)*2^(n-1)})
by Caldwell's Top-5000 list. For example they have
Phi(3,-16159^78732)
where clearly b=16159 while 78732=2^2*3^9 so m=3 and n=10.
(While many of us have started to memorize all powers of two (1,2,4,8,16,32,64,etc.) because of (generalized) Fermat numbers and other uses, the numbers 2^n*3^m are a bit harder to recognize, but see A003586 b-file.)
/JeppeSN | |
|
rogueVolunteer developer
 Send message
Joined: 8 Sep 07 Posts: 1221 ID: 12001 Credit: 18,565,548 RAC: 0
 
|
|
Good news!
My testing is almost done. It will need additional testing but I've run though a few things. The server seems to be working fine. The client handles cyclo correctly and pfgw can do the proof. | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
Good news!
My testing is almost done. It will need additional testing but I've run though a few things. The server seems to be working fine. The client handles cyclo correctly and pfgw can do the proof.
Does prpclient automatically invoke pfgw to do the proof?
I'd prefer if it didn't. It's the same situation we face with GFN -- when a PRP is found, the execution takes many times longer than normal. This is bad for two reasons. First, a user with slow hardware may find that they exceed the time limit, and the server sends the task out again -- and the second person's computer might return the task before the first computer, especially if the second computer has pfgw commented out. Secondly, the user might wrongly assume that something is wrong and abort the test.
The problem is, of course, compounded because pfgw doesn't checkpoint when doing a primality test. The proof, unless very short, is best done either on a server or inside a VM.
We can easily do the primality test on our end and save a lot of potential headaches.
As it is, we recommend that people comment out pfgw if they're running GFN.
Ideally, having a server-side configuration to enable or disable the client-side pfgw proof would be ideal, but from my perspective simply removing that function would be fine too.
Even if we have a lot of little proofs, it's no big deal for us to stick them in a file and batch process them on a server.
Making the timeout longer doesn't really help, because if we allow four times as long for the tests, inevitably someone will use a GPU that's four times as slow.
____________
My lucky number is 75898524288+1 | |
|
rogueVolunteer developer
 Send message
Joined: 8 Sep 07 Posts: 1221 ID: 12001 Credit: 18,565,548 RAC: 0
 
|
Good news!
My testing is almost done. It will need additional testing but I've run though a few things. The server seems to be working fine. The client handles cyclo correctly and pfgw can do the proof.
Does prpclient automatically invoke pfgw to do the proof?
I'd prefer if it didn't. It's the same situation we face with GFN -- when a PRP is found, the execution takes many times longer than normal. This is bad for two reasons. First, a user with slow hardware may find that they exceed the time limit, and the server sends the task out again -- and the second person's computer might return the task before the first computer, especially if the second computer has pfgw commented out. Secondly, the user might wrongly assume that something is wrong and abort the test.
The problem is, of course, compounded because pfgw doesn't checkpoint when doing a primality test. The proof, unless very short, is best done either on a server or inside a VM.
We can easily do the primality test on our end and save a lot of potential headaches.
As it is, we recommend that people comment out pfgw if they're running GFN.
Ideally, having a server-side configuration to enable or disable the client-side pfgw proof would be ideal, but from my perspective simply removing that function would be fine too.
Even if we have a lot of little proofs, it's no big deal for us to stick them in a file and batch process them on a server.
Making the timeout longer doesn't really help, because if we allow four times as long for the tests, inevitably someone will use a GPU that's four times as slow.
pfgw will automatically do the proof if the number is PRP. One difference with GFN is that I don't have it doing extended factoring. That is one of the reason that GFN proofs take so long. To disable means not configuring pfgw. pfgw will be used for cyclotomics that cyclo cannot handle.
As for configuring the client to do proofs, it is probably best to get to a certain b before turning it off. | |
|
rogueVolunteer developer
 Send message
Joined: 8 Sep 07 Posts: 1221 ID: 12001 Credit: 18,565,548 RAC: 0
 
|
|
I've committed everything to svn. I've also added support for generic searches, using pfgw, but haven't tested any of that code. | |
|
serge  Send message
Joined: 21 Jun 12 Posts: 112 ID: 144858 Credit: 257,402,313 RAC: 98,569
                    
|
|
Maybe a warm up run should be on n=16? (You have to seed the PRPNet server with something, for starters, right?)
The tasks are 2-5 minutes depending on the card, and so the initial sieving does not have to be very deep. Even the reconfirmation with pfgw for this size will not break anyone's comp - maybe 40 minutes to a couple hours.
I've created the proof code for CycloSv, together with Cyclo you will want to use it. Will someone (Michael? Jim?) run the initial sieiving as low as to maybe 10P? You may also need to remove all very small factors; you will find my simple sieve here. You will only need to run it to 34 bits, and CycloSv will remove the larger ones (it only starts from there). Here is the command-line you will want to run after compiling the PIESsv from the C source:
seq 2 900000 |awk '{print $1, 32768}' | ./PIESsv 1 34 > smallfactors.txt
(my 32768 power corresponds to n=16 case), then combine with factors from CycloSv 16 0 10 B12 and remove from the whole 'seq 2 900000' list.
n=16 is a very prime rich set (while rather few candidates survive the sieve). Start your engines, gentlemen? There's easily a few dozen primes waiting for you. | |
|
JimB Honorary cruncher Send message
Joined: 4 Aug 11 Posts: 916 ID: 107307 Credit: 974,532,191 RAC: 0
                    
|
|
I've compiled your program and am running it now. I'll then grab axn's program and start sieving with that. | |
|
serge  Send message
Joined: 21 Jun 12 Posts: 112 ID: 144858 Credit: 257,402,313 RAC: 98,569
                    
|
|
Great!
In the same thread you will find axn's program (I have not heard about another update, yet).
Note that on Windows you would want to use v.0.2 (not 0.3 which was simply a asm-less test), and for linux the CycloNoAsm.zip works quite well (not more than maybe 1.5 times slower than Windows, because asm was disabled; there is a bug somewhere in linux asm).
I've checked the error progression for n=16, and you can safely extend the range to 1M, I think; and axn's program sieves to 1M as well.
Here I compiled with Pari some candidates that you will also want to remove (for any n value): they are odd powers, higher than cubes. These will always be composite (cyloctomic factorization applies):
32 128 243 1024 2048 2187 3125 7776 8192 16384 16807 32768 59049 78125
100000 131072 161051 177147 248832 279936 371293 524288 537824 759375 823543
And, of note: every prime for n=16 will be eligible for Top5k (aw well, except b=13325 and b=15242). When submitting them add "Phi(3,-...^32768) Generalized unique" on the same line and they will be accepted even for b<400,000, because there is room in the GU top20 category. Unfortunately, this will knock out all of David Broadhurst's rather pretty Phi(5,n) expertly-designed-so-that-they-can-be-proven-by-N-1 numbers. Seriously, they are a piece of work, but they will have to step down. | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
|
Both Jim and I are having no luck running CycloSv. It's consuming 100% of a CPU core and not using the GPU at all. Jim is using a GTX 570 and I'm using a GTX 580.
We downloaded the software from here: http://mersenneforum.org/showpost.php?p=392061&postcount=33
I'm using the command line: CycloSvCUDA-0_2-win32.exe 16 1 2
I'm using nvidia driver 344.75 and Jim is using 347.25 (the latest).
Any ideas?
____________
My lucky number is 75898524288+1 | |
|
serge  Send message
Joined: 21 Jun 12 Posts: 112 ID: 144858 Credit: 257,402,313 RAC: 98,569
                    
|
|
Right. I had the same. The binary as posted is not running, but the code is fine.
Try the recompiled version (from code), I emailed it to Jim.
If you have a nvcc/Visual Studio set up (Nvidia does make it difficult recently by not honoring free Studio versions), then it is very easy to compile, too. compile.bat is included by axn, it is a one-liner. | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
|
The GFN sieving was done for b<100M. Is there any reason why the Cyclo sieving is set up for b<1M?
____________
My lucky number is 75898524288+1 | |
|
Yves GallotVolunteer developer Project scientist Send message
Joined: 19 Aug 12 Posts: 669 ID: 164101 Credit: 305,042,960 RAC: 0

|
|
Here is an estimate of the expected number of primes in ranges.
C_2 = 3.362195, [1, 1000000] = 132180.58.
C_4 = 4.643236, [1, 1000000] = 91271.57.
C_8 = 8.025718, [1, 1000000] = 78880.32.
C_16 = 7.638827, [1, 1000000] = 37538.89.
C_32 = 6.191340, [1, 1000000] = 15212.81.
C_64 = 6.947602, [1, 1000000] = 8535.51.
C_128 = 10.232648, [1, 1000000] = 6285.69.
C_256 = 10.375986, [1, 1000000] = 3186.87.
C_512 = 14.158609, [1, 1000000] = 2174.33.
C_1024 = 14.661934, [1, 1000000] = 1125.81.
C_2048 = 14.583534, [1, 1000000] = 559.90.
C_4096 = 12.060753, [1, 1000000] = 231.52.
C_8192 = 20.433405, [1, 1000000] = 196.12.
C_16384 = 20.074880, [1, 1000000] = 96.34.
C_32768 = 23.142110, [1, 1000000] = 55.53.
C_65536 = 20.704265, [1, 800000] = 20.23.
C_131072 = 18.721021, [1, 650000] = 7.56.
C_262144 = 17.797553, [1, 550000] = 3.08.
C_524288 = 29.107755, [1, 450000] = 2.10.
C_1048576 = 30.231939, [1, 360000] = 0.89.
C_2097152 = 29.966845, [1, 300000] = 0.37.
C_4194304 = 32.498993, [1, 250000] = 0.17.
In the prime database, we have for b < 1000000,
8192: 182 primes
16384: 111 primes
32768: 54 primes
| |
|
serge  Send message
Joined: 21 Jun 12 Posts: 112 ID: 144858 Credit: 257,402,313 RAC: 98,569
                    
|
|
The maxErr will be high for b>1M (for n>16), so there is not much benefit in sieving there.
There is no downside either though - only larger outputs (runtime is the same).
For n=16 only, maybe usable b range is higher. I will recompile the sieve to adjust output up to 2M tonight (Cyclo will probably produce some useful results higher than 1M but not as high as 2M). I've compiled the CycloSv verbatim (1M limit is in the code). Maybe axn meant that to be there only for the testing period.
The CycloCPU can be run above the GPU err limit, but we haven't seen it yet in the wild. Maybe we will soon. ;-) Its limit could be (higher? lower? the same as?) the GPU version, but maybe the 80-bit arithmetic version will be released. Just hypothesizing here... | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
The maxErr will be high for b>1M (for n>16), so there is not much benefit in sieving there.
There is no downside either though - only larger outputs (runtime is the same).
For n=16 only, maybe usable b range is higher. I will recompile the sieve to adjust output up to 2M tonight (Cyclo will probably produce some useful results higher than 1M but not as high as 2M). I've compiled the CycloSv verbatim (1M limit is in the code). Maybe axn meant that to be there only for the testing period.
The CycloCPU can be run above the GPU err limit, but we haven't seen it yet in the wild. Maybe we will soon. ;-) Its limit could be (higher? lower? the same as?) the GPU version, but maybe the 80-bit arithmetic version will be released. Just hypothesizing here...
Just for consistency's sake, I'd like this sieved with the same parameters as we sieved GFN. While there's no expectation now of crunching that high, we don't know what will happen next year, or in 5 years, and as you say the only downside is disk space.
We can always fork the code ourselves to make the change, but I don't want to do that. Once we do that, it makes it more complicated to open this up to public sieving because different versions of the sieve will produce more or less inclusive results. Then we need to build checks to make sure everyone is using the right version of the sieve, people will get upset when their work is rejected, and so forth. From my perspective, it's better to have the programs behave the same wave as their GFN equivalents. I look at efficiency slightly differently than most of the prime hunting community. While we all at least partly define efficiency as "getting the most work done in the least amount of time", I put a much greater weight on ease of use and error handling, which results in more people and computers crunching. Sometimes that leads to very significant differences in focus.
____________
My lucky number is 75898524288+1 | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
|
Mark,
Prpclient will run PFGW for PRPing cyclotomic tasks on the CPU, right?
Is it possible to get a server option to disable that and only use Cyclo on either GPU or CPU? (And conversely, if PFGW is enabled, Cyclo needs to be disabled.)
Since we're going to be doublechecking, because PFGW and Cyclo use different algorithms, they produce different residues. Therefore, you can't double check Cyclo vs PFGW results.
We'll eventually have a CPU version of Cyclo, so the current need for PFGW is only temporary. We'll start off as GPU-only, and add the CPU version when it is available.
We could conceivably want to use PFGW if we ever test numbers with a b high enough to require x87 for the cyclo algorithm. But when we're using Cyclo, we can't also use PFGW.
Thanks!
____________
My lucky number is 75898524288+1 | |
|
JimB Honorary cruncher Send message
Joined: 4 Aug 11 Posts: 916 ID: 107307 Credit: 974,532,191 RAC: 0
                    
|
I'll support
ABC Phi($a,$b^$c)
and
ABC Phi($a,$b)
but for the latter the grouping would be over $a whereas the former has a the grouping by $a and $c.
Does that mean I can use:
ABC Phi(3,$a^$b)
or am I going to have to use ABC Phi($a,$b^$c) and specify 3 (or 6) on each line? | |
|
rogueVolunteer developer
 Send message
Joined: 8 Sep 07 Posts: 1221 ID: 12001 Credit: 18,565,548 RAC: 0
 
|
I'll support
ABC Phi($a,$b^$c)
and
ABC Phi($a,$b)
but for the latter the grouping would be over $a whereas the former has a the grouping by $a and $c.
Does that mean I can use:
ABC Phi(3,$a^$b)
or am I going to have to use ABC Phi($a,$b^$c) and specify 3 (or 6) on each line?
Use (b), although it shouldn't be hard to modify the code to use (a). The code you need to change is in ABCParser.cpp. | |
|
rogueVolunteer developer
 Send message
Joined: 8 Sep 07 Posts: 1221 ID: 12001 Credit: 18,565,548 RAC: 0
 
|
Mark,
Prpclient will run PFGW for PRPing cyclotomic tasks on the CPU, right?
Is it possible to get a server option to disable that and only use Cyclo on either GPU or CPU? (And conversely, if PFGW is enabled, Cyclo needs to be disabled.)
Since we're going to be doublechecking, because PFGW and Cyclo use different algorithms, they produce different residues. Therefore, you can't double check Cyclo vs PFGW results.
We'll eventually have a CPU version of Cyclo, so the current need for PFGW is only temporary. We'll start off as GPU-only, and add the CPU version when it is available.
We could conceivably want to use PFGW if we ever test numbers with a b high enough to require x87 for the cyclo algorithm. But when we're using Cyclo, we can't also use PFGW.
pfgw will be used if cyclo is not configured. I would expect a CPU version of cyclo will be available before b is large enough to require pfgw.
PRPNet will likely need to be modified to use cyclo similar to how it uses genefer as the GPU version and CPU version of cyclo will be separate executables.
The client should also be modified to look at the maxerr from cyclo and switch to pfgw. | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
Mark,
Prpclient will run PFGW for PRPing cyclotomic tasks on the CPU, right?
Is it possible to get a server option to disable that and only use Cyclo on either GPU or CPU? (And conversely, if PFGW is enabled, Cyclo needs to be disabled.)
Since we're going to be doublechecking, because PFGW and Cyclo use different algorithms, they produce different residues. Therefore, you can't double check Cyclo vs PFGW results.
We'll eventually have a CPU version of Cyclo, so the current need for PFGW is only temporary. We'll start off as GPU-only, and add the CPU version when it is available.
We could conceivably want to use PFGW if we ever test numbers with a b high enough to require x87 for the cyclo algorithm. But when we're using Cyclo, we can't also use PFGW.
pfgw will be used if cyclo is not configured. I would expect a CPU version of cyclo will be available before b is large enough to require pfgw.
PRPNet will likely need to be modified to use cyclo similar to how it uses genefer as the GPU version and CPU version of cyclo will be separate executables.
The client should also be modified to look at the maxerr from cyclo and switch to pfgw.
What's configured on the client's side isn't under our control. Since we'll be comparing residues, we need a way to insure that the same program is used. Hence the need for a configurable server side switch. Less desirable (for obvious reasons) is simply removing the ability for prpnet to use PFGW for cylcotomic tests.
____________
My lucky number is 75898524288+1 | |
|
Yves GallotVolunteer developer Project scientist Send message
Joined: 19 Aug 12 Posts: 669 ID: 164101 Credit: 305,042,960 RAC: 0

|
|
The version 1.0 of CycloOCL is available at
http://yves.gallot.pagesperso-orange.fr/Cyclo/
The bug found by Mike (1000^65536 - 1000^32768 + 1 is composite [Res=3]. (0.1 sec., err=0.00e+000)) is fixed.
Two new options were added:
-s <sec> Seconds between screen outputs (default is 10),
-w <sec> Seconds between disk writes (default is 600),
-V and -H are supported (aliases for -v and -h).
Ctrl-C is caught and a checkpoint is written to the disk.
Can somebody try to generate a version for Linux? Because signal handling and time routines are called, this part of the code is different on Linux and on Windows.
| |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
|
I've tried experimenting with setting up a prpnet server. I loaded an ABC file that looks like this:
ABC Phi($a,$b^$c)
3 -2 32768
3 -3 32768
3 -4 32768
3 -5 32768
3 -6 32768
3 -7 32768
3 -8 32768
3 -9 32768
3 -10 32768
It went into the db with, for example, k = 3, b = -2, and n = 32768. Presumably, when passed to Cyclo, this will translate into 2^65536-2^32768+1, correct? I haven't gotten that far yet in the testing, but assuming that's correct, there's a problem.
On the server_stats web page, it lists -10 as "Min N" and -2 as "Max N". Two problems there. it's listing them in the wrong order (and possibly will send them out in the wrong order too), and it should be "B" rather than "N".
____________
My lucky number is 75898524288+1 | |
|
rogueVolunteer developer
 Send message
Joined: 8 Sep 07 Posts: 1221 ID: 12001 Credit: 18,565,548 RAC: 0
 
|
It went into the db with, for example, k = 3, b = -2, and n = 32768. Presumably, when passed to Cyclo, this will translate into 2^65536-2^32768+1, correct? I haven't gotten that far yet in the testing, but assuming that's correct, there's a problem.
On the server_stats web page, it lists -10 as "Min N" and -2 as "Max N". Two problems there. it's listing them in the wrong order (and possibly will send them out in the wrong order too), and it should be "B" rather than "N".
It does order correctly when sending out as it uses abs(b), but stats don't, so I'll fix stats to use abs(b). I'll also fix the header.
You can also use:
ABC Phi($a,$b^$c)
6 2 32768
6 3 32768
6 4 32768
6 5 32768
6 6 32768
6 7 32768
6 8 32768
6 9 32768
6 10 32768
That will also address the current problems with the stats and it will use cyclo for the PRP test. | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
ABC Phi($a,$b^$c)
6 2 32768
6 3 32768
6 4 32768
6 5 32768
6 6 32768
6 7 32768
6 8 32768
6 9 32768
6 10 32768
That will also address the current problems with the stats and it will use cyclo for the PRP test.
I figured it would, but we're planning on using Phi(3,x) since that's what will show up on T5K prime pages.
By the way, I loaded the ABC file via phpadmin. The help text on phpserver reads thusly:
Mark Rodenkirch's PRPNet Server, Version 5.4.0
-d Turn on all debugging
-h Show this menu
-l<filename> Load ABC file <filename> into database
-u Upgrade from 2.x to 3.x
I tried the -l<filename> option on prpserver to load the ABC file, but it seemed to do nothing. It did correctly parse the command line option (it didn't print the help text), but it didn't process the file:
./prpserver -ltest.abc
[2015-01-30 19:07:31 UTC] PRPNet Server application v5.4.0 started.
[2015-01-30 19:07:31 UTC] Please contact Mark Rodenkirch at XXXX for support
[2015-01-30 19:07:31 UTC] Waiting for connections on port XXXX
^C[2015-01-30 19:08:29 UTC] Signal recieved: SIGINT - Interrupt (Ctrl-C)
Error in my_thread_global_end(): 4 threads didn't exit
[2015-01-30 19:08:29 UTC] Server is shutting down
____________
My lucky number is 75898524288+1 | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
|
I built the client and connected to the test server above. On the client side, it happily went and crunched all the tasks. However, the first 5 tests (2<=b<=6) were rejected by the server. The next two were accepted. I can't see any difference between the ones that were accepted and the ones that were rejected. Then there were a bunch of "File Not Found" errors after I changed stopasapoption to 2.
Finally, the residue the client is reporting is NOT the complete residue reported by Cyclo.
Client output:
[2015-01-30 16:48:57 EST] PRPNet Client application v5.4.0 started
[2015-01-30 16:48:57 EST] User name Michael_Goetz at email address is XXXX
[2015-01-30 16:48:57 EST] CYCLO: Getting work from XXXX
[2015-01-30 16:48:58 EST] CYCLO: PRPNet server is version 5.4.0
Cyclotomic Polynomial Prime Search N=65536
Cyclo (OpenCL, v0.2), Copyright (C) 2014-15, Yves Gallot.
Running on platform 'NVIDIA CUDA', device 'GeForce GTX 580', version 'OpenCL 1.1 CUDA' and driver '344.75'.
2^65536 - 2^32768 + 1 is composite [Res=32593]. (6.4 sec., err=1.34e-012)
[2015-01-30 16:49:05 EST] CYCLO: Phi(3,-2^32768) is not prime. Residue 2593
[2015-01-30 16:49:05 EST] Total Time: 0:00:08 Total Work Units: 1 Special Results Found: 0
[2015-01-30 16:49:05 EST] CYCLO: Returning work to server XXXX
[2015-01-30 16:49:05 EST] CYCLO: INFO: Test for Phi(3,-2^32768) was ignored. Candidate and/or test was not found
[2015-01-30 16:49:05 EST] CYCLO: INFO: 0 of 1 test results were accepted
[2015-01-30 16:49:05 EST] CYCLO: Getting work from server XXXX
[2015-01-30 16:49:07 EST] CYCLO: PRPNet server is version 5.4.0
Cyclotomic Polynomial Prime Search N=65536
Cyclo (OpenCL, v0.2), Copyright (C) 2014-15, Yves Gallot.
Running on platform 'NVIDIA CUDA', device 'GeForce GTX 580', version 'OpenCL 1.1 CUDA' and driver '344.75'.
3^65536 - 3^32768 + 1 is composite [Res=65783]. (9.8 sec., err=2.27e-012)
[2015-01-30 16:49:17 EST] CYCLO: Phi(3,-3^32768) is not prime. Residue 5783
[2015-01-30 16:49:17 EST] Total Time: 0:00:20 Total Work Units: 2 Special Results Found: 0
[2015-01-30 16:49:17 EST] CYCLO: Returning work to server XXXX
[2015-01-30 16:49:17 EST] CYCLO: INFO: Test for Phi(3,-3^32768) was ignored. Candidate and/or test was not found
[2015-01-30 16:49:17 EST] CYCLO: INFO: 0 of 1 test results were accepted
[2015-01-30 16:49:17 EST] CYCLO: Getting work from server XXXX
[2015-01-30 16:49:18 EST] CYCLO: PRPNet server is version 5.4.0
Cyclotomic Polynomial Prime Search N=65536
Cyclo (OpenCL, v0.2), Copyright (C) 2014-15, Yves Gallot.
Running on platform 'NVIDIA CUDA', device 'GeForce GTX 580', version 'OpenCL 1.1 CUDA' and driver '344.75'.
4^65536 - 4^32768 + 1 is composite [Res=97844]. (13.0 sec., err=5.40e-012)
[2015-01-30 16:49:32 EST] CYCLO: Phi(3,-4^32768) is not prime. Residue 7844
[2015-01-30 16:49:32 EST] Total Time: 0:00:35 Total Work Units: 3 Special Results Found: 0
[2015-01-30 16:49:32 EST] CYCLO: Returning work to server XXXX
[2015-01-30 16:49:32 EST] CYCLO: INFO: Test for Phi(3,-4^32768) was ignored. Candidate and/or test was not found
[2015-01-30 16:49:32 EST] CYCLO: INFO: 0 of 1 test results were accepted
[2015-01-30 16:49:32 EST] CYCLO: Getting work from server XXXX
[2015-01-30 16:49:33 EST] CYCLO: PRPNet server is version 5.4.0
Cyclotomic Polynomial Prime Search N=65536
Cyclo (OpenCL, v0.2), Copyright (C) 2014-15, Yves Gallot.
Running on platform 'NVIDIA CUDA', device 'GeForce GTX 580', version 'OpenCL 1.1 CUDA' and driver '344.75'.
5^65536 - 5^32768 + 1 is composite [Res=131349]. (14.0 sec., err=6.75e-012)
[2015-01-30 16:49:48 EST] CYCLO: Phi(3,-5^32768) is not prime. Residue 31349
[2015-01-30 16:49:48 EST] Total Time: 0:00:51 Total Work Units: 4 Special Results Found: 0
[2015-01-30 16:49:48 EST] CYCLO: Returning work to server XXXX
[2015-01-30 16:49:48 EST] CYCLO: INFO: Test for Phi(3,-5^32768) was ignored. Candidate and/or test was not found
[2015-01-30 16:49:48 EST] CYCLO: INFO: 0 of 1 test results were accepted
[2015-01-30 16:49:48 EST] CYCLO: Getting work from server XXXX
[2015-01-30 16:49:49 EST] CYCLO: PRPNet server is version 5.4.0
Cyclotomic Polynomial Prime Search N=65536
Cyclo (OpenCL, v0.2), Copyright (C) 2014-15, Yves Gallot.
Running on platform 'NVIDIA CUDA', device 'GeForce GTX 580', version 'OpenCL 1.1 CUDA' and driver '344.75'.
6^65536 - 6^32768 + 1 is composite [Res=164263]. (15.4 sec., err=1.09e-011)
[2015-01-30 16:50:05 EST] CYCLO: Phi(3,-6^32768) is not prime. Residue 64263
[2015-01-30 16:50:05 EST] Total Time: 0:01:08 Total Work Units: 5 Special Results Found: 0
[2015-01-30 16:50:05 EST] CYCLO: Returning work to server XXXX
[2015-01-30 16:50:05 EST] CYCLO: INFO: Test for Phi(3,-6^32768) was ignored. Candidate and/or test was not found
[2015-01-30 16:50:05 EST] CYCLO: INFO: 0 of 1 test results were accepted
[2015-01-30 16:50:06 EST] CYCLO: Getting work from server XXXX
[2015-01-30 16:50:07 EST] CYCLO: PRPNet server is version 5.4.0
Cyclotomic Polynomial Prime Search N=65536
Cyclo (OpenCL, v0.2), Copyright (C) 2014-15, Yves Gallot.
Running on platform 'NVIDIA CUDA', device 'GeForce GTX 580', version 'OpenCL 1.1 CUDA' and driver '344.75'.
7^65536 - 7^32768 + 1 is composite [Res=196218]. (16.8 sec., err=1.50e-011)
[2015-01-30 16:50:24 EST] CYCLO: Phi(3,-7^32768) is not prime. Residue 96218
[2015-01-30 16:50:24 EST] Total Time: 0:01:27 Total Work Units: 6 Special Results Found: 0
[2015-01-30 16:50:24 EST] CYCLO: Returning work to server XXXX
[2015-01-30 16:50:24 EST] CYCLO: INFO: Test for Phi(3,-7^32768) was accepted
[2015-01-30 16:50:24 EST] CYCLO: INFO: All 1 test results were accepted
[2015-01-30 16:50:24 EST] CYCLO: Getting work from server XXXX
[2015-01-30 16:50:26 EST] CYCLO: PRPNet server is version 5.4.0
Cyclotomic Polynomial Prime Search N=65536
Cyclo (OpenCL, v0.2), Copyright (C) 2014-15, Yves Gallot.
Running on platform 'NVIDIA CUDA', device 'GeForce GTX 580', version 'OpenCL 1.1 CUDA' and driver '344.75'.
8^65536 - 8^32768 + 1 is composite [Res=229765]. (18.0 sec., err=1.86e-011)
[2015-01-30 16:50:44 EST] CYCLO: Phi(3,-8^32768) is not prime. Residue 29765
[2015-01-30 16:50:44 EST] Total Time: 0:01:47 Total Work Units: 7 Special Results Found: 0
[2015-01-30 16:50:44 EST] CYCLO: Returning work to server XXXX
[2015-01-30 16:50:44 EST] CYCLO: INFO: Test for Phi(3,-8^32768) was accepted
[2015-01-30 16:50:44 EST] CYCLO: INFO: All 1 test results were accepted
File Not Found
File Not Found
File Not Found
File Not Found
File Not Found
File Not Found
File Not Found
File Not Found
File Not Found
File Not Found
[2015-01-30 16:50:44 EST] Client shutdown complete
Finally, here's the server log (full debugging) for the first returned (and rejected) result. Not sure if there's any smoking gun in there about why it was rejected.
[2015-01-30 21:49:00 UTC] 7: client connecting from 108.14.56.11
[2015-01-30 21:49:00 UTC] 7: received [FROM 5.4.0 XXXX Viper Michael_Goetz PrimeSearchTeam 1]
[2015-01-30 21:49:00 UTC] 7: ODBC Connection via a driver: <XXXX>
[2015-01-30 21:49:00 UTC] 7: successfully connected to a MySQL database
[2015-01-30 21:49:00 UTC] 7: sending [Connected to server 5.4.0 31]
[2015-01-30 21:49:00 UTC] 7: received [RETURNWORK 5.4.0]
[2015-01-30 21:49:00 UTC] 7: received [WorkUnit: Phi(3,-2^32768) 1422654532]
[2015-01-30 21:49:00 UTC] 7: Executing statement: <select IsCompleted from CandidateTest where CandidateName = Phi(3,-2^32768) and TestID = 1422654532>
[2015-01-30 21:49:00 UTC] 7: 1 records fetched
[2015-01-30 21:49:00 UTC] 7: sending [INFO: Test for Phi(3,-2^32768) was ignored. Candidate and/or test was not found]
[2015-01-30 21:49:00 UTC] XXXX (Viper 1): Test 1422654532 for candidate Phi(3,-2^32768) was not found
[2015-01-30 21:49:00 UTC] 7: received [Start Child Phi(3,-2^32768)]
[2015-01-30 21:49:00 UTC] 7: received [Main Test: 0 2593 CycloOCL.exe 0.2), na na 6.400000]
[2015-01-30 21:49:00 UTC] 7: received [End Child Phi(3,-2^32768)]
[2015-01-30 21:49:00 UTC] 7: received [End of WorkUnit: Phi(3,-2^32768) 1422654532]
[2015-01-30 21:49:00 UTC] 7: received [End of Message]
[2015-01-30 21:49:00 UTC] 7: sending [INFO: 0 of 1 test results were accepted]
[2015-01-30 21:49:00 UTC] 7: sending [End of Message]
[2015-01-30 21:49:00 UTC] 7: disconnected from database
[2015-01-30 21:49:00 UTC] 7: closing socket
`IsCompleted` for the rejected tests is 0 in the DB.
____________
My lucky number is 75898524288+1 | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
|
One final anomaly:
CandidateTestResult.PRPingProgramVersion contains the value "0.2)," (without the quotes) for the successfully returned tests.
I should grab v1.0 of Cyclo and run it with that.
____________
My lucky number is 75898524288+1 | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
|
This may be helpful:
[2015-01-30 22:32:38 UTC] 5: client connecting from XXX
[2015-01-30 22:32:38 UTC] 5: received [FROM 5.4.0 XXXX Viper Michael_Goetz PrimeSearchTeam 1]
[2015-01-30 22:32:38 UTC] 5: ODBC Connection via a driver: <XXXXX>
[2015-01-30 22:32:38 UTC] 5: successfully connected to a MySQL database
[2015-01-30 22:32:38 UTC] 5: sending [Connected to server 5.4.0 31]
[2015-01-30 22:32:38 UTC] 5: received [GETWORK 5.4.0 1]
[2015-01-30 22:32:38 UTC] 5: received [cyclo]
[2015-01-30 22:32:38 UTC] 5: received [End of Message]
[2015-01-30 22:32:38 UTC] 5: sending [ServerConfig: 0]
[2015-01-30 22:32:38 UTC] 5: Executing statement: <select CandidateName, CompletedTests, DecimalLength, LastUpdateTime, k, b, c, n from Candidate where HasPendingTest = 0 and ifnull(MainTestResult, 0) = 0 and DoubleChecked = 0 and HasSierpinskiRieselPrime = 0 and CandidateName > and DecimalLength > 0 order by DecimalLength,LastUpdateTime limit 100>
[2015-01-30 22:32:38 UTC] 5: 1 records fetched
[2015-01-30 22:32:38 UTC] 5: Checking candidate Phi(3,-7^32768)
[2015-01-30 22:32:38 UTC] 5: Executing statement: <select count(*) from CandidateTest where CandidateName = Phi(3,-7^32768) and EmailID = XXXX@XXXX.com and MachineID = Viper >
[2015-01-30 22:32:38 UTC] 5: ODBC Information: SQL_ERROR: [MySQL][ODBC 3.51 Driver][mysqld-5.1.73-1-log]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@XXXX.com and MachineID = Viper' at line 1
[2015-01-30 22:32:38 UTC] 5: ODBC Information: SQL Statement: select count(*) from CandidateTest where CandidateName = Phi(3,-7^32768) and EmailID = XXXX@XXXX.com and MachineID = Viper
[2015-01-30 22:32:38 UTC] 5: Cannot double-check Phi(3,-7^32768)
[2015-01-30 22:32:38 UTC] 5: 2 records fetched
[2015-01-30 22:32:38 UTC] 5: Checking candidate Phi(3,-8^32768)
[2015-01-30 22:32:38 UTC] 5: Executing statement: <select count(*) from CandidateTest where CandidateName = Phi(3,-8^32768) and EmailID = XXXX@XXXX.com and MachineID = Viper >
[2015-01-30 22:32:38 UTC] 5: ODBC Information: SQL_ERROR: [MySQL][ODBC 3.51 Driver][mysqld-5.1.73-1-log]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@XXXX.com and MachineID = Viper' at line 1
[2015-01-30 22:32:38 UTC] 5: ODBC Information: SQL Statement: select count(*) from CandidateTest where CandidateName = Phi(3,-8^32768) and EmailID = XXXX@XXXX.com and MachineID = Viper
[2015-01-30 22:32:38 UTC] 5: Cannot double-check Phi(3,-8^32768)
[2015-01-30 22:32:38 UTC] 5: 3 records fetched
[2015-01-30 22:32:38 UTC] 5: Checking candidate Phi(3,-9^32768)
[2015-01-30 22:32:38 UTC] 5: Executing statement: <update Candidate set HasPendingTest = 1 where CandidateName = Phi(3,-9^32768) and HasPendingTest = 0>
[2015-01-30 22:32:38 UTC] 5: 1 rows affected
[2015-01-30 22:32:38 UTC] First check for candidate Phi(3,-9^32768)
[2015-01-30 22:32:38 UTC] 5: Executing statement: <insert into CandidateTest ( CandidateName, TestID, EmailID, MachineID, InstanceID, UserID, TeamID, EmailSent ) values ( Phi(3,-9^32768),1422657158,XXXX@XXXX.com,Viper,1,Michael_Goetz,PrimeSearchTeam,0 )>
[2015-01-30 22:32:38 UTC] 5: 1 rows affected
[2015-01-30 22:32:38 UTC] 5: sending [WorkUnit: Phi(3,-9^32768) 1422657158 3 -9 32768]
[2015-01-30 22:32:38 UTC] 5: Phi(3,-9^32768) sent to Email: XXXX User: Michael_Goetz Machine: Viper Instance: 1
[2015-01-30 22:32:39 UTC] 5: sending [End of Message]
[2015-01-30 22:32:39 UTC] 5: sending [Start Greeting]
[2015-01-30 22:32:39 UTC] 5: sending [Cyclotomic Polynomial Prime Search b^65536 - b^32768 +1]
[2015-01-30 22:32:39 UTC] 5: sending [End Greeting]
[2015-01-30 22:32:39 UTC] 5: disconnected from database
[2015-01-30 22:32:39 UTC] 5: closing socket
Looks like the SQL statement that looks for DC candidates is missing quotes around the email address.
____________
My lucky number is 75898524288+1 | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
I should grab v1.0 of Cyclo and run it with that.
1.0 behaves exactly the same as 0.2 as far as the anomalies are concerned.
____________
My lucky number is 75898524288+1 | |
|
|
|
I've tried experimenting with setting up a prpnet server. I loaded an ABC file that looks like this:
ABC Phi($a,$b^$c)
3 -2 32768
3 -3 32768
3 -4 32768
3 -5 32768
3 -6 32768
3 -7 32768
3 -8 32768
3 -9 32768
3 -10 32768
As I explained earlier I think it would be less confusing if that was:
ABCD Phi($a,$b*$c^$d)
3 -1 2 32768
3 -1 3 32768
3 -1 4 32768
3 -1 5 32768
3 -1 6 32768
3 -1 7 32768
3 -1 8 32768
3 -1 9 32768
3 -1 10 32768
Or maybe just:
ABC Phi(3,$a*$b^$c)
-1 2 32768
-1 3 32768
-1 4 32768
-1 5 32768
-1 6 32768
-1 7 32768
-1 8 32768
-1 9 32768
-1 10 32768
/JeppeSN | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
As I explained earlier I think it would be less confusing if that was:
This is internal stuff and nobody outside the admins sees it. We won't be confused. :)
____________
My lucky number is 75898524288+1 | |
|
rogueVolunteer developer
 Send message
Joined: 8 Sep 07 Posts: 1221 ID: 12001 Credit: 18,565,548 RAC: 0
 
|
By the way, I loaded the ABC file via phpadmin. The help text on phpserver reads thusly:
Mark Rodenkirch's PRPNet Server, Version 5.4.0
-d Turn on all debugging
-h Show this menu
-l<filename> Load ABC file <filename> into database
-u Upgrade from 2.x to 3.x
I tried the -l<filename> option on prpserver to load the ABC file, but it seemed to do nothing. It did correctly parse the command line option (it didn't print the help text), but it didn't process the file:
./prpserver -ltest.abc
[2015-01-30 19:07:31 UTC] PRPNet Server application v5.4.0 started.
[2015-01-30 19:07:31 UTC] Please contact Mark Rodenkirch at XXXX for support
[2015-01-30 19:07:31 UTC] Waiting for connections on port XXXX
^C[2015-01-30 19:08:29 UTC] Signal recieved: SIGINT - Interrupt (Ctrl-C)
Error in my_thread_global_end(): 4 threads didn't exit
[2015-01-30 19:08:29 UTC] Server is shutting down
The -i option was broken in a previous release. I haven't taken the time to see why. | |
|
rogueVolunteer developer
 Send message
Joined: 8 Sep 07 Posts: 1221 ID: 12001 Credit: 18,565,548 RAC: 0
 
|
|
The failed SQL statements are due to missing single quotes when building the SQL when doing the double-check check.
There is some code that is unnecessary when work is returned that under some conditions (unknown reasons) returns an unexpected value. It is why the tests are rejected. I would expect the code to either always be successful or always fail. I'll remove the offending code.
The client is not be extracting the version correctly from cyclo.
These are fixed and checked in.
Don't worry about the "file not found" messages. The client will delete all potential temp files created by the various helper programs when it exits. | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
The failed SQL statements are due to missing single quotes when building the SQL when doing the double-check check.
There is some code that is unnecessary when work is returned that under some conditions (unknown reasons) returns an unexpected value. It is why the tests are rejected. I would expect the code to either always be successful or always fail. I'll remove the offending code.
The client is not be extracting the version correctly from cyclo.
These are fixed and checked in.
Don't worry about the "file not found" messages. The client will delete all potential temp files created by the various helper programs when it exits.
Mark, it's looking better and better.
Tests are now being accepted. That's fixed.
I'm still doing testing, but right now I only see 3 problems that are serious enough to prevent going live, and one minor problem.
Needed before going live:
1) The double check SQL error (missing quotes) is still present and preventing double check tasks from being sent out:
[2015-01-31 05:16:30 UTC] 5: Checking candidate Phi(3,-4^32768)
[2015-01-31 05:16:30 UTC] 5: Executing statement: <select count(*) from CandidateTest where CandidateName = 'Phi(3,-4^32768)' and EmailID = XXXX@XXXX.com and MachineID = Viper >
[2015-01-31 05:16:30 UTC] 5: ODBC Information: SQL_ERROR: [MySQL][ODBC 3.51 Driver][mysqld-5.1.73-1-log]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@XXXX.com and MachineID = Viper' at line 1
[2015-01-31 05:16:30 UTC] 5: ODBC Information: SQL Statement: select count(*) from CandidateTest where CandidateName = 'Phi(3,-4^32768)' and EmailID = XXXX@XXXX.com and MachineID = Viper
[2015-01-31 05:16:30 UTC] 5: Cannot double-check Phi(3,-4^32768)
2) PFGW must be inhibited from doing the primality test. The Cyclo test took 15 seconds. The PFGW primality test took 406 seconds. With longer tasks it will be impractical to have the tests arbitrarily run 30 times longer. This is a barrier to going into production.
3) PFGW needs to be prevented from running the PRP test. The double check residue discrepancy between cyclo and pfgw is also a barrier to going into production.
Minor Problems:
4) The formatting problem with the Cyclo version number that is stored in the database has not been fixed.
____________
My lucky number is 75898524288+1 | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
|
Yves,
Is there a reason we get shorter, base-10 residues from Cyclo, as opposed to the 16-digit hexadecimal residues from Genefer?
____________
My lucky number is 75898524288+1 | |
|
rogueVolunteer developer
 Send message
Joined: 8 Sep 07 Posts: 1221 ID: 12001 Credit: 18,565,548 RAC: 0
 
|
|
I did not check in one of the source files that I modified. The double-check check should be fixed, but I haven't tested it.
The change for pfgw will take more time as it affects more files. | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
I did not check in one of the source files that I modified. The double-check check should be fixed, but I haven't tested it.
The change for pfgw will take more time as it affects more files.
Understood -- it's a big change. Thanks!
____________
My lucky number is 75898524288+1 | |
|
Yves GallotVolunteer developer Project scientist Send message
Joined: 19 Aug 12 Posts: 669 ID: 164101 Credit: 305,042,960 RAC: 0

|
Yves,
Is there a reason we get shorter, base-10 residues from Cyclo, as opposed to the 16-digit hexadecimal residues from Genefer?
Genefer computes its residue with the lower bits of 8 components of the length-n vertor.
I think that it is better to uses every component.
The "new" residue is the summation of all components. Then its value is about n*b/2 for composites and 0 for primes.
1000^1024 - 1000^512 + 1 is composite [Res=494609].
1001^1024 - 1001^512 + 1 is composite [Res=516077].
1002^1024 - 1002^512 + 1 is composite [Res=500853].
1003^1024 - 1003^512 + 1 is composite [Res=498956].
1004^1024 - 1004^512 + 1 is composite [Res=507022].
Its real value cannot be predicted and the distribution of their normalized values (res / (n*b/2)) could be interesting to check some hypothesis on the randomness.
It is large enough to detect some computation errors. It is in base 10 because I printed with "%llu" and not "%llx".
But you can read it as a 16-digit hexadecimal residue, with few (not significant) zeros located to the left and no letter :o) | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
|
Mark:
Minor correction:
On the server status page, B now shows as positive numbers, so the Form column (first column) should show "Phi(3, -b^32768)" as opposed to "Phi(3, b^32768)".
Suggestion:
Also, purely cosmetic, since this is HTML and we're not limited to vanilla ASCII, you can chose to display that as "Phi(3, -b<sup>32768</sup>)", or even as "Φ<sub>3</sub>(-b<sup>32768</sup>)". That last one uses the greek Phi character. I don't feel strongly about it either way.
As a purely educational point, perhaps using the Greek letter would be best so people not familiar with this see the actual mathematical representation and get to ask "What's that?"
Major problem (but likely a trivial fix):
I just grabbed the latest checkin, and the server won't send tasks now. This is the server log;
[2015-01-31 14:56:35 UTC] 5: client connecting from XXXX
[2015-01-31 14:56:35 UTC] 5: received [FROM 5.4.0 XXXX Viper Wingman PrimeSearchTeam 1]
[2015-01-31 14:56:35 UTC] 5: ODBC Connection via a driver: <XXXX>
[2015-01-31 14:56:35 UTC] 5: successfully connected to a MySQL database
[2015-01-31 14:56:35 UTC] 5: sending [Connected to server 5.4.0 31]
[2015-01-31 14:56:35 UTC] 5: received [GETWORK 5.4.0 1]
[2015-01-31 14:56:35 UTC] 5: received [pfgw]
[2015-01-31 14:56:35 UTC] 5: received [cyclo]
[2015-01-31 14:56:35 UTC] 5: received [End of Message]
[2015-01-31 14:56:35 UTC] 5: sending [ServerConfig: 0]
[2015-01-31 14:56:35 UTC] 5: Executing statement: <select CandidateName, CompletedTests, DecimalLength, LastUpdateTime, k, b, c, n from Candidate where HasPendingTest = 0 and ifnull(MainTestResult, 0) = 0 and DoubleChecked = 0 and HasSierpinskiRieselPrime = 0 and CandidateName > ' ' and DecimalLength > 0 order by n,DecimalLength,LastUpdateTime limit 100>
[2015-01-31 14:56:35 UTC] 5: 1 records fetched
[2015-01-31 14:56:35 UTC] 5: Checking candidate Phi(3,-2^32768)
[2015-01-31 14:56:35 UTC] Fatal error. Not enough bound variables for <select count(*) from CandidateTest where CandidateName = ? and EmailID = ? and MachineID = ? >
____________
My lucky number is 75898524288+1 | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
Yves,
Is there a reason we get shorter, base-10 residues from Cyclo, as opposed to the 16-digit hexadecimal residues from Genefer?
Genefer computes its residue with the lower bits of 8 components of the length-n vertor.
I think that it is better to uses every component.
The "new" residue is the summation of all components. Then its value is about n*b/2 for composites and 0 for primes.
1000^1024 - 1000^512 + 1 is composite [Res=494609].
1001^1024 - 1001^512 + 1 is composite [Res=516077].
1002^1024 - 1002^512 + 1 is composite [Res=500853].
1003^1024 - 1003^512 + 1 is composite [Res=498956].
1004^1024 - 1004^512 + 1 is composite [Res=507022].
Its real value cannot be predicted and the distribution of their normalized values (res / (n*b/2)) could be interesting to check some hypothesis on the randomness.
It is large enough to detect some computation errors. It is in base 10 because I printed with "%llu" and not "%llx".
But you can read it as a 16-digit hexadecimal residue, with few (not significant) zeros located to the left and no letter :o)
It would be helpful if it was printed in hexadecimal. The ability to easily and instantly see groups of 16 bits is exceptionally helpful is picking out obviously fault calculations in Genefer. It might be useful for Cyclo as well.
It will be interesting to see whether the Cyclo method is more or less useful than the Genefer method. With Genefer's residue calculation, we could often visually see that a calculation had failed by glancing at the residue.
I 100% agree that using all the components is preferable. Do you think it's better to use XOR rather than summation?
____________
My lucky number is 75898524288+1 | |
|
Yves GallotVolunteer developer Project scientist Send message
Joined: 19 Aug 12 Posts: 669 ID: 164101 Credit: 305,042,960 RAC: 0

|
I 100% agree that using all the components is preferable. Do you think it's better to use XOR rather than summation?
The better is both and I just modified the program to print them because they fit in with a 64-bit word.
The first 6 digits are the XOR of components and the last 10 their sums.
10^1024 - 10^512 + 1 is composite [Res=00000800000011ae].
100^1024 - 100^512 + 1 is composite [Res=000076000000c0c2].
10000^1024 - 10000^512 + 1 is composite [Res=002e7600004f127c].
1000000^1024 - 1000000^512 + 1 is composite [Res=0d63a8001f1b8c48].
You can download the 1.0.1. | |
|
rogueVolunteer developer
 Send message
Joined: 8 Sep 07 Posts: 1221 ID: 12001 Credit: 18,565,548 RAC: 0
 
|
|
I had a compiler error in CycloProgram.cpp which explains why the version wasn't correct. I also fixed (I think) the double-check logic. I bound the variables, but didn't set values to them.
As for the HTML, that is easier said than done. I have an idea regarding what I should do about that, but I'll have to work on that when I have more time. | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
As for the HTML, that is easier said than done. I have an idea regarding what I should do about that, but I'll have to work on that when I have more time.
If it's not a trivial change, I wouldn't bother with it.
____________
My lucky number is 75898524288+1 | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
I had a compiler error in CycloProgram.cpp which explains why the version wasn't correct. I also fixed (I think) the double-check logic. I bound the variables, but didn't set values to them.
I rebuilt prpserver and prpclient. Definitely built and am using the new versions. Have a new CycloProgram.cpp and PrimeWorkSender.cpp from the repo.
Still getting this:
[2015-01-31 19:03:25 UTC] 5: client connecting from 108.14.56.11
[2015-01-31 19:03:25 UTC] 5: received [FROM 5.4.0 XXXX Viper Wingman PrimeSearchTeam 1]
[2015-01-31 19:03:25 UTC] 5: ODBC Connection via a driver: <XXXX>
[2015-01-31 19:03:25 UTC] 5: successfully connected to a MySQL database
[2015-01-31 19:03:25 UTC] 5: sending [Connected to server 5.4.0 31]
[2015-01-31 19:03:25 UTC] 5: received [GETWORK 5.4.0 1]
[2015-01-31 19:03:25 UTC] 5: received [pfgw]
[2015-01-31 19:03:25 UTC] 5: received [cyclo]
[2015-01-31 19:03:25 UTC] 5: received [End of Message]
[2015-01-31 19:03:25 UTC] 5: sending [ServerConfig: 0]
[2015-01-31 19:03:25 UTC] 5: Executing statement: <select CandidateName, CompletedTests, DecimalLength, LastUpdateTime, k, b, c, n from Candidate where HasPendingTest = 0 and ifnull(MainTestResult, 0) = 0 and DoubleChecked = 0 and HasSierpinskiRieselPrime = 0 and CandidateName > ' ' and DecimalLength > 0 order by n,DecimalLength,LastUpdateTime limit 100>
[2015-01-31 19:03:25 UTC] 5: 1 records fetched
[2015-01-31 19:03:25 UTC] 5: Checking candidate Phi(3,-2^32768)
[2015-01-31 19:03:25 UTC] Fatal error. Not enough bound variables for <select count(*) from CandidateTest where CandidateName = ? and EmailID = ? and MachineID = ? >
____________
My lucky number is 75898524288+1 | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
|
I think I see the problem...
These are the calls to bind and set the SQL parameters:
sqlStatement->BindInputParameter(candidateName, NAME_LENGTH);
sqlStatement->BindInputParameter(is_EmailID, false);
sqlStatement->BindInputParameter(is_MachineID, false);
sqlStatement->SetInputParameterValue(candidateName, true);
sqlStatement->SetInputParameterValue(is_EmailID, NAME_LENGTH);
sqlStatement->SetInputParameterValue(is_MachineID, NAME_LENGTH);
These are the function templates:
SQLStatement.h(53): void BindInputParameter(string stringParameter, int32_t maxStringLength, bool hasValue = true);
SQLStatement.h(54): void BindInputParameter(char *ntsParameter, int32_t maxNtsLength, bool hasValue = true);
SQLStatement.h(55): void BindInputParameter(int32_t int32Parameter, bool isNull = false);
SQLStatement.h(56): void BindInputParameter(int64_t int64Parameter, bool isNull = false);
SQLStatement.h(57): void BindInputParameter(double doubleParameter, bool isNull = false);
Since all three are strings, I think the two BindInputParameter calls for the Email and Machine IDs are missing a length parameter.
Furthermore, the last two SetInputParameterValue calls should have a bool as the second parameter.
____________
My lucky number is 75898524288+1 | |
|
rogueVolunteer developer
 Send message
Joined: 8 Sep 07 Posts: 1221 ID: 12001 Credit: 18,565,548 RAC: 0
 
|
I think I see the problem...
These are the calls to bind and set the SQL parameters:
sqlStatement->BindInputParameter(candidateName, NAME_LENGTH);
sqlStatement->BindInputParameter(is_EmailID, false);
sqlStatement->BindInputParameter(is_MachineID, false);
sqlStatement->SetInputParameterValue(candidateName, true);
sqlStatement->SetInputParameterValue(is_EmailID, NAME_LENGTH);
sqlStatement->SetInputParameterValue(is_MachineID, NAME_LENGTH);
These are the function templates:
SQLStatement.h(53): void BindInputParameter(string stringParameter, int32_t maxStringLength, bool hasValue = true);
SQLStatement.h(54): void BindInputParameter(char *ntsParameter, int32_t maxNtsLength, bool hasValue = true);
SQLStatement.h(55): void BindInputParameter(int32_t int32Parameter, bool isNull = false);
SQLStatement.h(56): void BindInputParameter(int64_t int64Parameter, bool isNull = false);
SQLStatement.h(57): void BindInputParameter(double doubleParameter, bool isNull = false);
Since all three are strings, I think the two BindInputParameter calls for the Email and Machine IDs are missing a length parameter.
Furthermore, the last two SetInputParameterValue calls should have a bool as the second parameter.
Probably should put this into another thread, use PM, or e-mail...
The calls to SetInputParameterValue are not necessary. The calls to BindInputParameter should have NAME_LENGTH instead of false. | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
Probably should put this into another thread, use PM, or e-mail...
I was thinking about that, but the majority of this thread is about design or debugging of Cyclo, the sieves, or PRPNet. I think we'll just start a new thread when there's something other than planning and implementation to discuss.
____________
My lucky number is 75898524288+1 | |
|
|
|
Probably should put this into another thread, use PM, or e-mail...
Please don't go private. This is all very interesting and somewhat educational to me and probably some others. Makes me want to get back to learning code. Only a novice now.
EDIT: It would be nice if more deeper ins and outs, whys and why nots of Primegrid and some of the behind the scene discussions (of course not relating to security, cheating) were public, even if trivial.
____________
Largest Primes to Date:
As Double Checker: SR5 109208*5^1816285+1 Dgts-1,269,534
As Initial Finder: SR5 243944*5^1258576-1 Dgts-879,713
| |
|
|
|
|
+1
I have been following this thread quite closely. I don't understand half of it, but it's fascinating to see some of the work behind PG.
Also, I get the impression that this new subproject might yield some more (or "easier"?) primes, which doubles my interest. | |
|
rogueVolunteer developer
 Send message
Joined: 8 Sep 07 Posts: 1221 ID: 12001 Credit: 18,565,548 RAC: 0
 
|
|
Due to the interest here in seeing our discussion of software, I suggest that those of you who are interested in programming checkout the PRPNet source from sourceforge. It is written in C++ and has no assembly. Since it doesn't perform the PRP tests itself, it doesn't have all of the complex math. Various object-oriented programming concepts can be found in the code such inheritance and polymorphism. There are also more advanced software architecture concepts implemented such as database access, multi-threading, and various design patterns. | |
|
axnVolunteer developer Send message
Joined: 29 Dec 07 Posts: 285 ID: 16874 Credit: 28,027,106 RAC: 0
            
|
|
I've uploaded version 0.4 of CycloSv @ the mforum thread. I have updated the bmax to 100M (similar to GFN sieve).
The package includes the source, a win32 binary (CUDA 3.2) and linux compile scripts. You'll need to build your own linux executable.
While sieving the lowest range (0-1p which is actually 10G-1P), you should NOT use a block value > 8.
One thing to note is that the program won't necessarily output all factors to the screen -- it'll only write at the most 4 factors per block. | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
|
Without minimizing all the work Yves, Anand, Mark and Serge have done, I'd like to thank Jim for putting a lot of effort into getting Cyclo sieving ready for prime time. He's done a lot of testing and organizing, and I'm pleased to say we're now ready to open up manual Cyclo sieving to the public. If you would like to help sieve, please see the reservation page here: http://primesearchteam.com/showthread.php?t=95.
Please note that at this time sieving can only be done on an Nvidia GPU, and only a Windows client is available.
If you would like to help by compiling a Linux version of the sieve client, please see axn's post in the discussion thread.
____________
My lucky number is 75898524288+1 | |
|
|
|
The small list
2^2 - 2^1 + 1
2^4 - 2^2 + 1
2^8 - 2^4 + 1
5^16 - 5^8 + 1
4^32 - 4^16 + 1
2^64 - 2^32 + 1
5^128 - 5^64 + 1
196^256 - 196^128 + 1
14^512 - 14^256 + 1
129^1024 - 129^512 + 1
424^2048 - 424^1024 + 1
484^4096 - 484^2048 + 1
22^8192 - 22^4096 + 1
should be completed...
Yves
OEIS has A246119 so apparently the list continues:
5164^16384 - 5164^8192 + 1
7726^32768 - 7726^16384 + 1
13325^65536 - 13325^32768 + 1
Note that what is called n in that OEIS entry corresponds to n-1 in this thread.
Now I just realize that serge already said all this (even linked A246119) in his posts above, so I am being redundant here.
/JeppeSN
And then:
96873^131072 - 96873^65536 + 1
192098^262144 - 192098^131072 + 1
All of these by serge. The one with 96873 was submitted to OEIS on 30 December, mentioned a couple of times in this thread, and finally approved into OEIS on 03 February. The 192098 find was submitted to OEIS on 10 February. See Prime Pages Phi(3,-192098^131072).
/JeppeSN
| |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
[quote]How high can maxErr go before it becomes a problem?
It's a complicated question, see
http://www.primegrid.com/forum_thread.php?id=6062&nowrap=true#81774
Yves,
We'll need some sort of not-so-complicated answer for this complicated question before we put this into production. We need to know what candidates we can safely test with Cyclo, otherwise it's hard to have confidence in the results.
Any ideas?
____________
My lucky number is 75898524288+1 | |
|
axnVolunteer developer Send message
Joined: 29 Dec 07 Posts: 285 ID: 16874 Credit: 28,027,106 RAC: 0
            
|
We'll need some sort of not-so-complicated answer for this complicated question before we put this into production.
Same as GeneFer? | |
|
Yves GallotVolunteer developer Project scientist Send message
Joined: 19 Aug 12 Posts: 669 ID: 164101 Credit: 305,042,960 RAC: 0

|
How high can maxErr go before it becomes a problem?
It's a complicated question, see
http://www.primegrid.com/forum_thread.php?id=6062&nowrap=true#81774
Yves,
We'll need some sort of not-so-complicated answer for this complicated question before we put this into production. We need to know what candidates we can safely test with Cyclo, otherwise it's hard to have confidence in the results.
Any ideas?
I think that the bounds of the bench define some 'safe' ranges:
1466042^8192
1199080^16384
980730^32768
802140^65536
656072^131072
536602^262144
438888^524288
358968^1048576
293600^2097152
240136^4194304
196408^8388608
I'm testing these numbers to check the errors. | |
|
Yves GallotVolunteer developer Project scientist Send message
Joined: 19 Aug 12 Posts: 669 ID: 164101 Credit: 305,042,960 RAC: 0

|
I think that the bounds of the bench define some 'safe' ranges:[...]
These bounds are safe but probably too small:
1466042^8192 - 1466042^4096 + 1 is composite [Res=1c9f520168c64d08]. (9.4 sec., err=1.99e-001)
1199080^16384 - 1199080^8192 + 1 is composite [Res=0c362c02486bbdec]. (20.8 sec., err=1.82e-001)
980730^32768 - 980730^16384 + 1 is composite [Res=0f691a03ba07cd2e]. (49.3 sec., err=1.88e-001)
802140^65536 - 802140^32768 + 1 is composite [Res=06820e061bf13adc]. (115.3 sec., err=2.03e-001)
656072^131072 - 656072^65536 + 1 is composite [Res=06a5610a049fc9cb]. (361.4 sec., err=2.03e-001)
536602^262144 - 536602^131072 + 1 is composite [Res=02986710636c5783]. (1337.5 sec., err=2.13e-001)
438888^524288 - 438888^262144 + 1 is composite [Res=0389581ad05cc3d0]. (4705.1 sec., err=2.27e-001)
I'm computing some larger and safe bounds.
The main problem is that error is not smooth:
347458^32768 - 347458^16384 + 1 is a probable prime. (34.9 sec., err=2.51e-002, 181565 digits)
350159^32768 - 350159^16384 + 1 is a probable prime. (35.2 sec., err=5.86e-002, 181675 digits)
352694^32768 - 352694^16384 + 1 is a probable prime. (34.5 sec., err=2.67e-002, 181778 digits)
With GFN, it is smoother. | |
|
Yves GallotVolunteer developer Project scientist Send message
Joined: 19 Aug 12 Posts: 669 ID: 164101 Credit: 305,042,960 RAC: 0

|
The main problem is that error is not smooth:
347458^32768 - 347458^16384 + 1 is a probable prime. (34.9 sec., err=2.51e-002, 181565 digits)
350159^32768 - 350159^16384 + 1 is a probable prime. (35.2 sec., err=5.86e-002, 181675 digits)
352694^32768 - 352694^16384 + 1 is a probable prime. (34.5 sec., err=2.67e-002, 181778 digits)
I just understood: this is because of parity (the number of significant bits).
We should test some odd numbers to find the bound. With even numbers, the bound is larger.
| |
|
Yves GallotVolunteer developer Project scientist Send message
Joined: 19 Aug 12 Posts: 669 ID: 164101 Credit: 305,042,960 RAC: 0

|
Yves,
We'll need some sort of not-so-complicated answer for this complicated question before we put this into production. We need to know what candidates we can safely test with Cyclo, otherwise it's hard to have confidence in the results.
Any ideas?
I think that we can start with these bounds:
1500001^8192 - 1500001^4096 + 1 is composite [Res=11f4d70171239739]. (6.7 sec., err=1.95e-001)
1200001^16384 - 1200001^8192 + 1 is composite [Res=1be453024b534a61]. (14.7 sec., err=1.88e-001)
1000001^32768 - 1000001^16384 + 1 is composite [Res=08332f03d3ac65dd]. (38.5 sec., err=1.99e-001)
800001^65536 - 800001^32768 + 1 is composite [Res=0721a106198019eb]. (136.4 sec., err=1.91e-001)
650001^131072 - 650001^65536 + 1 is composite [Res=00aeb309e1907495]. (509.1 sec., err=2.03e-001)
540001^262144 - 540001^131072 + 1 is composite [Res=05cd21107c72d19f]. (1860.5 sec., err=2.21e-001)
440001^524288 - 440001^262144 + 1 is composite [Res=05d7e21ad8dd3ba2]. (7704.9 sec., err=2.42e-001)
360001^1048576 - 360001^524288 + 1 is composite [Res=02a25b2be8feebc3]. (28347.3 sec., err=2.32e-001)
Later, it will be extended. But to do it, it is important to record the errors.
Let us consider that we can be confident in the result if err <= 0.4.
That should be true for all b's in the ranges that I indicated.
With Cyclo 1.0.1, for N=32768, err <= 0.4 if b <= 1000000 and all primes are identified.
If 1000000 < b <= 1100000, all primes are identified but sometimes with err > 0.4:
1003271^32768 - 1003271^16384 + 1 is a probable prime. (38.1 sec., err=4.26e-001, 196655 digits)
1007934^32768 - 1007934^16384 + 1 is a probable prime. (37.2 sec., err=2.22e-001, 196721 digits)
1019849^32768 - 1019849^16384 + 1 is a probable prime. (37.5 sec., err=3.44e-001, 196888 digits)
1034698^32768 - 1034698^16384 + 1 is a probable prime. (37.3 sec., err=2.24e-001, 197094 digits)
1052811^32768 - 1052811^16384 + 1 is a probable prime. (38.4 sec., err=4.31e-001, 197341 digits)
1063662^32768 - 1063662^16384 + 1 is a probable prime. (37.6 sec., err=2.34e-001, 197487 digits)
1079569^32768 - 1079569^16384 + 1 is a probable prime. (37.5 sec., err=5.00e-001, 197698 digits)
1098136^32768 - 1098136^16384 + 1 is a probable prime. (37.6 sec., err=2.42e-001, 197941 digits)
For b > 1100000, there are some correct results and some wrong (with err > 0.4):
1129153^32768 - 1129153^16384 + 1 is composite [Res=106eed044ace254b]. (37.6 sec., err=4.92e-001)
1138316^32768 - 1138316^16384 + 1 is a probable prime. (37.6 sec., err=2.54e-001, 198452 digits)
1148089^32768 - 1148089^16384 + 1 is composite [Res=0bd5720460291510]. (37.8 sec., err=4.84e-001)
1203036^32768 - 1203036^16384 + 1 is a probable prime. (37.8 sec., err=2.90e-001, 199239 digits)
| |
|
serge  Send message
Joined: 21 Jun 12 Posts: 112 ID: 144858 Credit: 257,402,313 RAC: 98,569
                    
|
|
Will there be a PRPNet port for Cyclo tests for n=16 and n=17?
And maybe a new thread in the PSA subforum?
While testing the error distribution, I found a prime just below 10^6, but no primes above 10^6 (with the error creeping up, so there probably won't be one, with this version of Cyclo; maybe there is one, but it is masked by residue diversion from true values due to increasing error). Yves, could the z-transform procedure need a special treatment like the one that LLR/PFGW/P95 are running for the first and last 30-50 iterations (a slower iteration code version with even higher precision)? | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
|
That's our goal once the software is ready.
____________
My lucky number is 75898524288+1 | |
|
serge  Send message
Joined: 21 Jun 12 Posts: 112 ID: 144858 Credit: 257,402,313 RAC: 98,569
                    
|
While testing the error distribution, I found a prime just below 10^6, but no primes above 10^6 (with the error creeping up, so there probably won't be one, with this version of Cyclo; maybe there is one, but it is masked by residue diversion from true values due to increasing error).
Found one more at the very end (where maxErr for every other candidate is on the verge of untrusted; both are validated with pfgw -a1). The distance between b=1164012 and 966644 is ~3 times the expected distance between primes for n=16. Either this is a bona fide gap (which is possible; it is a Bernoulli process after all), or there are currently undetectable primes (especially with odd b values, where err is higher).
Yves: 1) could the z-transform procedure need a special treatment like the one that LLR/PFGW/P95 are running for the first and last 30-50 iterations (a slower iteration code version with even higher precision)? 2) could the same slow procedure be bootstrapped onto regions where maxErr spikes (again, borrowing from the implementation behavior of LLR/PFGW/P95 in similar situations). If necessary, these segments can be run on CPU: speed is secondary to quality.
P.S. Clarfiying: I only worked in questionable maxErr regions: slightly below 1M and up to but not reaching 1.17-1.2M. | |
|
axnVolunteer developer Send message
Joined: 29 Dec 07 Posts: 285 ID: 16874 Credit: 28,027,106 RAC: 0
            
|
|
Perhaps Cyclo can be updated to track the iteration at which maxerr appeared, so that we can see if selective intervention at initial/final iterations is sufficient to rescue the primes.
Also, an 80-bit routine (a la Genefer80) is probably needed for better error results. | |
|
Yves GallotVolunteer developer Project scientist Send message
Joined: 19 Aug 12 Posts: 669 ID: 164101 Credit: 305,042,960 RAC: 0

|
Perhaps Cyclo can be updated to track the iteration at which maxerr appeared, so that we can see if selective intervention at initial/final iterations is sufficient to rescue the primes.
Err=4.994e-007 @ 4/656736.
Err=3.351e-005 @ 5/656736.
[...]
Err=1.709e-001 @ 20/656736.
Err=1.719e-001 @ 262/656736.
[...]
Err=2.188e-001 @ 112958/656736.
Err=2.422e-001 @ 318832/656736.
Err=5.000e-001 @ 656717/656736.
1079569^32768 - 1079569^16384 + 1 is a probable prime. (280.7 sec., err=5.00e-001, 197698 digits)
Err=3.376e-007 @ 3/1320593.
Err=8.251e-006 @ 4/1320593.
[...]
Err=2.422e-001 @ 22/1320593.
[...]
Err=3.750e-001 @ 12633/1320593.
Err=3.867e-001 @ 161787/1320593.
Err=3.936e-001 @ 163687/1320593.
Err=3.965e-001 @ 170138/1320593.
Err=3.984e-001 @ 603205/1320593.
Err=4.043e-001 @ 968381/1320593.
1164012^65536 - 1164012^32768 + 1 is a probable prime. (846.0 sec., err=4.04e-001, 397539 digits)
Err=5.890e-007 @ 3/342980.
Err=7.607e-005 @ 4/342980.
[...]
Err=4.336e-001 @ 9917/342980.
[...]
Err=4.688e-001 @ 106483/342980.
Err=5.000e-001 @ 342963/342980.
2003289^16384 - 2003289^8192 + 1 is composite [Res=06a58603d17807ca]. (108.4 sec., err=5.00e-001)
Err=1.341e-007 @ 3/342779.
[...]
Err=3.047e-001 @ 26/342779.
Err=3.203e-001 @ 40/342779.
Err=3.672e-001 @ 45/342779.
Err=3.730e-001 @ 443/342779.
[...]
Err=4.395e-001 @ 46467/342779.
Err=4.863e-001 @ 66941/342779.
Err=5.000e-001 @ 342763/342779.
1986325^16384 - 1986325^8192 + 1 is composite [Res=196a3d03d1be382d]. (107.9 sec., err=5.00e-001)
Note that these four numbers are prime and that final results would have been correct if a higher precision was used for the last 20 iterations.
Why the last 20 iterations??? | |
|
Yves GallotVolunteer developer Project scientist Send message
Joined: 19 Aug 12 Posts: 669 ID: 164101 Credit: 305,042,960 RAC: 0

|
1) could the z-transform procedure need a special treatment like the one that LLR/PFGW/P95 are running for the first and last 30-50 iterations (a slower iteration code version with even higher precision)?
Yes, for the last 30 iterations according to the tests.
We can use:
- 80-bit floating point type. This is 'long double' type in gcc... I have to find how to compile an OpenCL application with gcc.
- double-double type. It can be implemented on CPU or GPU. It may be 'fast' on GPU or with avx/fma.
- a number theoretic transform: I wrote one with p = 2^64 - 2^32 + 1 and GFN. There is no error but it is slower.
2) could the same slow procedure be bootstrapped onto regions where maxErr spikes (again, borrowing from the implementation behavior of LLR/PFGW/P95 in similar situations). If necessary, these segments can be run on CPU: speed is secondary to quality.
In the OpenCL implementation, maxErr is not computed at each iteration.
We compute an array of maxErr which is stored into GPU memory (parallelism).
It is reduced to a single value into CPU memory during the final step or when a checkpoint is written.
Then the code would be slower if we check maxErr at each iteration.
But the last 30 iterations seem to be a good choice.
I would be happy to understand why!? | |
|
serge  Send message
Joined: 21 Jun 12 Posts: 112 ID: 144858 Credit: 257,402,313 RAC: 98,569
                    
|
|
The magic value of 30 is just any value that exceeds log log N for all numbers that we are going to test in our lifetimes.
The rounding errors are random (and sort of normally distributed) when the array is essentially random bits -- and it is for almost all computation run. But for the log log N iterations (last in your case, and in Prime95, also first), the z-array exhibits sparseness (e.g. in the first and last iterations, just one non-zero element and the rest zeroes, and for the 2nd and 2nd last, less so, and so on), and that sparseness in a nutshell violates the randomness property, and distribution of errors becomes non-normal and deviations into high values are happening.
| |
|
|
|
I have to find how to compile an OpenCL application with gcc.
I think this is not possible on Windows. Nvidia only support use of MSVC or the Intel compiler. I tried for some time without success to hack together a toolchain to use nvcc with gcc/mingw.
On Linux or Mac, nvcc works fine with gcc.
____________
Twitter: IainBethune
Proud member of team "Aggie The Pew". Go Aggie!
3073428256125*2^1290000-1 is Prime! | |
|
Yves GallotVolunteer developer Project scientist Send message
Joined: 19 Aug 12 Posts: 669 ID: 164101 Credit: 305,042,960 RAC: 0

|
The rounding errors are random (and sort of normally distributed) when the array is essentially random bits -- and it is for almost all computation run. But for the log log N iterations (last in your case, and in Prime95, also first), the z-array exhibits sparseness (e.g. in the first and last iterations, just one non-zero element and the rest zeroes, and for the 2nd and 2nd last, less so, and so on), and that sparseness in a nutshell violates the randomness property, and distribution of errors becomes non-normal and deviations into high values are happening.
My question was "why the distribution may be non-normal in the last iterations?".
That's not obvious because distribution is normal for
1164012^65536 - 1164012^32768 + 1
but is not for
1079569^32768 - 1079569^16384 + 1.
First of all, it should not occur with composite numbers then if the error is large at b (in comparison with its neighbours) then a prime was found!?
I found an explanation:
If b is even, the last iterations are some squares. The roots of unity are not a problem because when the z-array is sparse, it is only filled with 0 and +/-1 (and then err=0). And the previous iteration (which is not filled with 0 and +/-1) is normal.
But if b is odd, we may have a "2 * P^2" step at the end.
Let P = x^(8*n) - x^(4*n) + 1 and
A = a*((x^(3*n) - 1)/(x - 1) * x^(5*n) - (x^n - 1)/(x - 1) * (x^(3*n)+ 1)) + x^n.
A is a polynomial of degree 8*n - 1 if we replace (x^(3*n) - 1)/(x - 1) and (x^n - 1)/(x - 1) by their sums.
Let a = (x - 1)/2 := (b - 1)/2. Then 2 * A^2 = 1 (mod P).
A is filled with 0, 1 and +/-(b - 1)/2. This distribution generates a large error. | |
|
|
|
|
Not sure if this has been mentioned already in this thread but I just remarked elsewhere that GF(m, 8) = GF(m, 2^3)
= (2^3)^(2^m) + 1
= (2^(2^m))^3 + 1
= (2^(2^m) + 1)*((2^(2^m))^2 - 2^(2^m) + 1)
= F(m)*(2^(2^(m+1)) - 2^(2^m) + 1)
so any "cyclo" number in our sense is a generalized Fermat divisor of GF(m, 8), the cofactor being the classical Fermat number F(m).
/JeppeSN | |
|
serge  Send message
Joined: 21 Jun 12 Posts: 112 ID: 144858 Credit: 257,402,313 RAC: 98,569
                    
|
Not sure if this has been mentioned already in this thread but I just remarked elsewhere that
GF(m, 8) = GF(m, 2^3)
= (2^3)^(2^m) + 1
= (2^(2^m))^3 + 1
= (2^(2^m) + 1)*((2^(2^m))^2 - 2^(2^m) + 1)
= F(m)*(2^(2^(m+1)) - 2^(2^m) + 1)
so any "cyclo" number in our sense is a generalized Fermat divisor of GF(m, 8),
the cofactor being the classical Fermat number F(m).
Yep, and for that reason one should not frequently expect b=2 to be a survivor for any n values soon in our "Cyclo"tomic searches, - after sieving.
The new GF(...33, 8) factor 27*2^n+1 will enter this table in position 3 (scroll down to the " 8 1 " section, with the leader being Tang's recent 3-2-1 prime).
Usually, GF(8,n) is in fact meant to be the cyclotomic cofactor (e.g. in Keller's tables); otherwise every Fermat factor would have to be listed twice. | |
|
|
|
|
Yes, F(m) divides each of GF(m, 8), GF(m, 32), GF(m, 128), GF(m, 512), etc. /JeppeSN | |
|
Yves GallotVolunteer developer Project scientist Send message
Joined: 19 Aug 12 Posts: 669 ID: 164101 Credit: 305,042,960 RAC: 0

|
|
A CPU version of "Cyclo" can be downloaded at
http://yves.gallot.pagesperso-orange.fr/Cyclo/
The binary is a x64 Windows application, the source code is available if someone wants to compile it for another OS.
It was compiled with gcc 4.9.2. It can be compiled with Visual Studio 2012/13, but it leads to slower code.
This binary file requires AVX support to execute.
Any idea of when PRPNet ports for Cyclo tests are going to be available... | |
|
serge  Send message
Joined: 21 Jun 12 Posts: 112 ID: 144858 Credit: 257,402,313 RAC: 98,569
                    
|
|
I think that there was an opinion that your software was not ready; perhaps, some of your (or our collective) overlong discussions about the problems that will only appear once people will reach high values of b -- may have misled them.
That's our goal once the software is ready.
I vouch that it is ready.
The enhancements for high b's can and will be added later, but for vast low value ranges, this software is the best thing since the sliced bread, if you ask me. | |
|
Yves GallotVolunteer developer Project scientist Send message
Joined: 19 Aug 12 Posts: 669 ID: 164101 Credit: 305,042,960 RAC: 0

|
|
A new version of "CycloCPU" can be downloaded at
http://yves.gallot.pagesperso-orange.fr/Cyclo/
The binary is a x64 Windows application and the source code is available.
It runs on any 64-bit x86-compatible CPU.
Four versions of the transform are available: "default", "sse4.1", "avx" and "fma".
At runtime, the appropriate version is automatically executed depending on the processor microarchitecture.
| |
|
RogerVolunteer developer Volunteer tester
 Send message
Joined: 27 Nov 11 Posts: 1138 ID: 120786 Credit: 268,621,444 RAC: 21
                    
|
|
I have AMD X6 1100T CPU. Looks like CPU version is correctly using "default" transform.
>CycloCPU.exe -q "22^8192-22^4096+1"
Cyclo (CPU-x64-default, v1.0.2), Copyright (C) 2014-15, Yves Gallot.
22^8192 - 22^4096 + 1 is a probable prime. (4.0 sec., err=4.00e-011, 10998 digits)
>CycloCPU.exe -q "2^65536-2^32768+1"
Cyclo (CPU-x64-default, v1.0.2), Copyright (C) 2014-15, Yves Gallot.
2^65536 - 2^32768 + 1 is composite [Res=0000000000007f52]. (91.0 sec., err=1.39e-012)
| |
|
Yves GallotVolunteer developer Project scientist Send message
Joined: 19 Aug 12 Posts: 669 ID: 164101 Credit: 305,042,960 RAC: 0

|
I have AMD X6 1100T CPU. Looks like CPU version is correctly using "default" transform.
Note that "default" is SSE2 because all 64-bit processors have SSE2 instruction set.
default: vector of two 64-bit floating-point numbers, round function is emulated.
sse4.1: vector of two 64-bit floating-point numbers, no emulation.
avx: vector of four 64-bit floating-point numbers (half the number of FP instructions).
fma: vector of four 64-bit floating-point numbers and fused multiply–add (more instructions per clock cycle). | |
|
serge  Send message
Joined: 21 Jun 12 Posts: 112 ID: 144858 Credit: 257,402,313 RAC: 98,569
                    
|
|
I've now tested Yves' latest CycloCPU v.1.0.3 head-to-head on a few old numbers that I have ran with LLRP (i.e. LLR that uses b^{3*2^{n-1}}+1 FFT).
CycloCPU is almost exactly 1.5 times faster, which makes sense because it does the convolutions over the minimal possible array (size=2^n) which is 1.5 times shorter than the array used by LLRP/GWNUM. The quality of asm code from both masters (Yves and George) is on par, so the result is as good as could have been expected.
It works perfectly on CPU (and on a good GPU is ~2-3 times faster still). Fair warning: now, I will run some n=17 candidates above the single known prime; maybe I will get lucky. I've been waiting for the PRPNet port to open for ~5 months now. Tired of waiting.
Thanks, Yves! | |
|
Yves GallotVolunteer developer Project scientist Send message
Joined: 19 Aug 12 Posts: 669 ID: 164101 Credit: 305,042,960 RAC: 0

|
|
Cyclo 1.1.0 can be downloaded at http://yves.gallot.pagesperso-orange.fr/Cyclo/
The CPU and the GPU versions are merged into a single application.
If the "-g" option is set, it runs on GPU, otherwise "default" (sse2), "sse4.1", "avx" or "fma" transform is selected.
Four binaries for Windows are available:
- Cyclo: x64 + OpenCL.
- Cyclo32: x86 + OpenCL.
- CycloCPU: x64 only.
- CycloCPU32: x86 only.
CPU versions are available because of OpenCL.dll dependency. You can use them if OpenCL is not installed on your computer.
For the last 50 iterations, a 80-bit transform is executed. Then now prime numbers have no "spiked" error.
Windows applications were compiled with gcc 5.1. The source code is available for other OS.
| |
|
Yves GallotVolunteer developer Project scientist Send message
Joined: 19 Aug 12 Posts: 669 ID: 164101 Credit: 305,042,960 RAC: 0

|
|
Cyclo 1.1.1 is available, fixing a possible "spiked" error with prime numbers.
Serge completed the range n=17 to b=10^6 (b^131072 - b^65536 + 1): wow!
11 primes were 'expexted' (C_131072 = 18.721021, N[1, 1000000] = 11.23)
and 16 were found:
----- -------------------------------- ------- ----- ---- --------------
rank description digits who year comment
----- -------------------------------- ------- ----- ---- --------------
250 Phi(3,-984522^65536) 785545 p379 2015 Generalized unique
259 Phi(3,-883969^65536) 779412 p379 2015 Generalized unique
260 Phi(3,-872989^65536) 778700 p379 2015 Generalized unique
262 Phi(3,-862325^65536) 778001 p379 2015 Generalized unique
263 Phi(3,-861088^65536) 777919 p379 2015 Generalized unique
269 Phi(3,-806883^65536) 774218 p379 2015 Generalized unique
271 Phi(3,-770202^65536) 771570 p379 2015 Generalized unique
275 Phi(3,-757576^65536) 770629 p379 2015 Generalized unique
276 Phi(3,-731582^65536) 768641 p379 2015 Generalized unique
281 Phi(3,-682504^65536) 764688 p379 2015 Generalized unique
288 Phi(3,-605347^65536) 757859 p379 2015 Generalized unique
321 Phi(3,-340594^65536) 725122 p379 2015 Generalized unique
324 Phi(3,-329886^65536) 723303 p379 2015 Generalized unique
349 Phi(3,-242079^65536) 705687 p379 2015 Generalized unique
369 Phi(3,-180139^65536) 688864 p379 2015 Generalized unique
459 Phi(3,-96873^65536) 653552 L4026 2014 Generalized unique
Note that in the same range, 6.6 generalized Fermat primes were expected and 6 were found:
280 689186^131072+1 765243 g429 2013 Generalized Fermat
292 572186^131072+1 754652 g0 2004 Generalized Fermat
315 386892^131072+1 732377 p259 2009 Generalized Fermat
354 228188^131072+1 702323 g124 2010 Generalized Fermat
403 130816^131072+1 670651 g308 2003 Generalized Fermat
551 62722^131072+1 628808 g308 2003 Generalized Fermat
Now the search for mega generalized unique primes is starting to find a new record:
54 Phi(3,-192098^131072) 1385044 p379 2015 Generalized unique
| |
|
serge  Send message
Joined: 21 Jun 12 Posts: 112 ID: 144858 Credit: 257,402,313 RAC: 98,569
                    
|
I've now tested Yves' latest CycloCPU v.1.0.3 head-to-head on a few old numbers that I have ran with LLRP (i.e. LLR that uses b^{3*2^{n-1}}+1 FFT).
CycloCPU is almost exactly 1.5 times faster, which makes sense because it does the convolutions over the minimal possible array (size=2^n) which is exactly 1.5 times shorter than the array used by LLRP/GWNUM. The quality of asm code from both masters (Yves and George) is on par, so the result is as good as could have been expected.
Now, I have found that LLRP (on CPU) has a great niche use case.
Because LLRP uses higher convolution dimension, it has lower round-off errors.
Therefore, it should be used for the range just above the max round-off error limit of Cyclo. At the price of 1.5x longer run times (which is much better than that of Cyclo80). It can be adapted for GPU as well.
For example, I can run it for the range ~980000<b<1500000 for n=17 and find another half a dozen primes.
P.S. And, yes, another n=18 prime was now found. | |
|
|
|
|
Michael's last post in this thread was:
That's our goal once the software is ready.
Has PrimeGrid decided not to pursue this prime type now?
Any update would be welcome.
I did a little of the initial sieving as requested and I do participate in PRPNet projects from time to time so I would be greatly interested.
Thanks,
Peter.
____________
35 x 2^3587843+1 is prime! | |
|
Michael Goetz Volunteer moderator Project administrator
 Send message
Joined: 21 Jan 10 Posts: 13633 ID: 53948 Credit: 280,904,358 RAC: 40,710
                           
|
Michael's last post in this thread was:
That's our goal once the software is ready.
Has PrimeGrid decided not to pursue this prime type now?
Any update would be welcome.
This is really a question for Iain as I'm no longer as involved here -- or at least trying really hard to not be as involved. I believe Iain is away this week, however.
As far as I know, nothing has changed since then. At that time, we could not run Cyclo on BOINC and we could not run it on PRPNet -- or at least we couldn't run it the way we want to, with full error checking.
Whether or not PrimeGrid is still interested is a question I can't answer. I'm not the one making that decision.
____________
My lucky number is 75898524288+1 | |
|
|
|
Any update would be welcome.
This is really a question for Iain...
We don't have any plans at present to start running Cyclo on either PRPNet or BOINC - there are several issues already discussed in the thread that would need to be overcome before we could do so.
- Iain
____________
Twitter: IainBethune
Proud member of team "Aggie The Pew". Go Aggie!
3073428256125*2^1290000-1 is Prime! | |
|
Yves GallotVolunteer developer Project scientist Send message
Joined: 19 Aug 12 Posts: 669 ID: 164101 Credit: 305,042,960 RAC: 0

|
We don't have any plans at present to start running Cyclo on either PRPNet or BOINC - there are several issues already discussed in the thread that would need to be overcome before we could do so. - Iain
What are they?
Cyclo interface is similar to Genefer interface and Genefer is running on PRPNet...
The sieve is ready and very efficient.
I stop waiting and will go on and write an automated revervation web page / server. With the current technologies, it's an easy task.
| |
|
Message boards :
Number crunching :
b^{2^n} - b^{2^{n-1}} + 1 |