![]() |
![]() |
#1 |
Sep 2003
5·11·47 Posts |
![]()
mprime can do k*b^n+c
How feasible would it be, in principle, to adapt gpuOwL to be more flexible? Wagstaff in particular: (2^p+1)/3 |
![]() |
![]() |
![]() |
#2 | |
Sep 2002
Database er0rr
103216 Posts |
![]() Quote:
![]() Working mod 2^p+1 is almost as easy as 2^p-1. Then a final division by 3 to get mod (2^p+1)/3. E.g: Code:
p=127;Mod(3,2^p+1)^2^p Mod(9, 170141183460469231731687303715884105729) |
|
![]() |
![]() |
![]() |
#3 | |
Sep 2003
5·11·47 Posts |
![]() Quote:
Probably type-4 would also be applicable to Wagstaff? Or perhaps type-2, which is similar to type-4 except using N−1 instead of N+1. Code:
2: SPRP variant, N is PRP if a^((N-1)/2) = +/-1 mod N 4: SPRP variant. N is PRP if a^((N+1)/2) = +/-a mod N |
|
![]() |
![]() |
![]() |
#4 | |
Sep 2003
5·11·47 Posts |
![]() Quote:
Like I mentioned earlier, the Wagstaff PRP calculation for type 5 is 3^(2^p) mod (2^p + 1) whereas for Mersenne (where type 1 and type 5 are the same thing), it's 3^(2^p − 2) mod (2^p − 1). I don't know if there is a similarly simple modification for type 4 or type 2 residues. Since gpuOwL is a GitHub project, theoretically someone else could make the modification, possibly even forking from an earlier version that still used Mersenne type 1 residues. |
|
![]() |
![]() |
![]() |
#5 | ||
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest
2·32·192 Posts |
![]()
Of course. He volunteers his time, according to his talents and interests, like many others. None of us has a claim on him or each other, or authority to select one path versus another for him. To his credit, he sometimes accepts or asks for input from the user community. And if we users summarize outstanding issues or new desires, it can make him more efficient. Win-win.
Quote:
Quote:
There are other ways to do Wagstaff, to ~920M, though maybe not as high a p as you'd like to go to if you're thinking of taking the new Mersenne conjecture testing further. There are also other ways to do p-1 factoring on Mersennes, although not above ~432.5M in CUDAPm1 in practice, or ~920M in mprime/prime95, and not on OpenCl at all. |
||
![]() |
![]() |
![]() |
#6 | |
"Mihai Preda"
Apr 2015
2·691 Posts |
![]() Quote:
In the Mersenne case, we want a cyclic convolution. The simple weighting that is done before/after the FFT achieves that. For the "mod 2^p+1", we want a negacyclic convolution. Can this be achieved through a similar weighting (with different weights)? Or is something more involved needed? To add a bit more detail: in the mersenne case, the weights are real. IF for 2^p+1 we need weighting with complex weights, this changes the implementation significantly because the FFT input is not real anymore. |
|
![]() |
![]() |
![]() |
#7 | |
P90 years forever!
Aug 2002
Yeehaw, FL
73·23 Posts |
![]() Quote:
You also need to apply complex roots-of-minus-one to "trick" the FFT into doing a negacyclic convolution instead of a cyclic convolution. You don't need any extra FFT memory, but you do need a modified first pass that takes real inputs and produces weighted complex FFT'ed outputs. Not easy, but not hard either. Next you need a new simpler second pass that scraps all the Hermetian symmetry computations before the point-wise squaring. |
|
![]() |
![]() |
![]() |
#8 | ||
∂2ω=0
Sep 2002
República de California
267208 Posts |
![]() Quote:
Quote:
|
||
![]() |
![]() |
![]() |
#9 | |
"Mihai Preda"
Apr 2015
101011001102 Posts |
![]()
Thank you, this is useful!
Quote:
|
|
![]() |
![]() |
![]() |
#10 |
Jun 2003
123678 Posts |
![]()
Forked the Wagstaff discussion into a separate thread (copy - original posts are still there).
|
![]() |
![]() |
![]() |
#11 |
Sep 2002
Database er0rr
2×3×691 Posts |
![]() |
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
gpuowl: runtime error | SELROC | GpuOwl | 69 | 2021-09-29 10:07 |
Status of Wagstaff testing? and testing Mersenne primes for Wagstaff-ness | GP2 | Wagstaff PRP Search | 414 | 2020-12-27 08:11 |
gpuOwl Windows setup for Radeon VII | Prime95 | GpuOwl | 91 | 2019-12-30 08:30 |
gpuowl tuning | M344587487 | GpuOwl | 14 | 2018-12-29 08:11 |
How to interface gpuOwl with PrimeNet | preda | PrimeNet | 2 | 2017-10-07 21:32 |