20110901, 17:55  #1 
"Robert Gerbicz"
Oct 2005
Hungary
2×7×103 Posts 
Wilsonprime search practicalities

20110903, 07:37  #2  
"Tapio Rajala"
Feb 2010
Finland
3^{2}·5·7 Posts 
Quote:
Speaking about waste of resources: I checked what they are doing at the Ibercivisproject: The server gave 30 primes of size ~2e9 to check with a looong expected completion time. Needless to say, I didn't finish those. I was surprised that Toshio wanted to have a source for the new nearWilson primes (in Wikipedia) given that he did not provide a valid source for the previous nearWilson primes found by rogue. Perhaps someone should put the uptodate information to some other webpage... 

20110903, 08:29  #3  
Mar 2011
Germany
2^{3}×11 Posts 
Quote:
So far I found 3 near Wilson primes: 10242692519 197p 11355061259 145p 20042556601 1+27p Cheers, Danilo 

20110903, 10:27  #4  
"Robert Gerbicz"
Oct 2005
Hungary
10110100010_{2} Posts 
Quote:
I have modified the code, now it is possible to abort and continue it. It saves the progress after each block of primes that processed. Last fiddled with by R. Gerbicz on 20110903 at 10:27 

20110903, 11:21  #5 
(loop (#_fork))
Feb 2006
Cambridge, England
2×3,191 Posts 
There is a tiny problem in the downloaded code when I use some compilers: the prototype for func() doesn't match the definition of func() because you've changed the first two parameters from mpz_t to lli. Trivial to fix.
Is it asymptotically better to run this on several cores using a small interval on each, or on one core using the largest interval that fits in memory? I have quite a large machine and can allocate 32GB to the process if that would help. I am a little surprised that when I do echo e "100000000000\n100010000000\n10000\n1\n"  time ./a.out I get Testing p=100000000073...100001026973, p==5 mod 12, time=1 sec. and then no further output for at least a thousand seconds; is there something in the implementation to make 5 mod 12 unusually quick? I tried 10^9 .. 10^9+10^8 and it worked fine, so I don't think it's hanging. Last fiddled with by fivemack on 20110903 at 11:23 
20110903, 11:26  #6  
Mar 2011
Germany
2^{3}·11 Posts 
Quote:
(Still I let the range 1E10 to 5E10 running by the older version.) I found yet another "very near" Wilson prime, damn close: 11774118061 11p 

20110903, 12:11  #7  
"Robert Gerbicz"
Oct 2005
Hungary
2·7·103 Posts 
Quote:
In fact when the code prints "Testing ..." it is still testing those primes, so they are not checked, but found all those type of primes from that interval and computed the product of these primes. The ratio of speed for different types are: 3:2:1 for large primes, so p==1 mod 3 is the fastest and p==11 mod 12 is the slowest. It is better to run the largest interval on one core that fits in memory. That was the reason I've used only one core for my search. (running t cores and on each of them testing interval/t primes yield the same speed with 1 core and interval primes.) 

20110903, 12:58  #8 
(loop (#_fork))
Feb 2006
Cambridge, England
2·3,191 Posts 
OK, I'll take 5e10 to 6e10 (interval size 4e7 seems about right for that)

20110903, 17:40  #9 
Mar 2011
Germany
58_{16} Posts 
Wilsonprime search practicalities
I am not sure about that. I made some benchmarks up to 5E7 using different intervals and found that the optimal interval size is always (about) 1/1000 of the upper boundary. Though I did not check for very large values, my guess here is that there should be also some optimal value which is not using the full memory. I will do some more testing with higher values...

20110903, 17:43  #10  
Aug 2006
2^{2}×1,493 Posts 
Quote:


20110903, 17:50  #11  
Mar 2011
Germany
2^{3}×11 Posts 
Quote:
Here are my timings: pmax interval seconds 50000000 2000000 1494 50000000 50000 1024 10000000 10000000 178 10000000 2000000 166 10000000 1000000 163 10000000 500000 168 10000000 10000 110 5000000 2000000 69 5000000 1000000 66 5000000 500000 64 5000000 100000 73 5000000 50000 61 5000000 10000 44 5000000 5000 42 5000000 1000 52 2000000 500000 19 2000000 200000 18 2000000 100000 17 2000000 2000 12 1000000 500000 7 1000000 200000 7 1000000 100000 6 1000000 1000 5 You can see that the optimal interval value is always 1/1000 of the upper boundary. 

Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Twin prime search?  MooooMoo  Twin Prime Search  115  20100829 17:38 
k=51 or about coordinated prime search  Kosmaj  Riesel Prime Search  7  20070713 22:15 
Prime Search on PS3?  Kosmaj  Riesel Prime Search  6  20061121 15:19 
Genetics and Wilson's theorem  David John Hill Jr  Science & Technology  2  20060510 14:10 
Generalized wilson's theorem  bouayoun  Math  3  20040312 18:24 