20170702, 22:54  #1 
"Edmond Condillac"
Jul 2017
London
1 Posts 
Combining CPUs
Is there any way to combine two or more CPUs or motherboards or PCs to make it quicker to process the search for prime numbers, please?

20170702, 23:25  #2 
Sep 2002
Database er0rr
2^{4}×229 Posts 
Not really. With multisocket boards it often better to set a primehunting program to use one socket per program. The only program I know of that uses multisockets well is Primo and that program is for proving primes, not hunting. Also, the scaling of cores used degrades with more threads  perhaps 4 is optimal. Then there is memory bandwidth to consider. So on your average 4 core box it is advisable to switch off hyperthreading and run 4 real cores when searching for really big primes; Otherwise run 1 program per core. For P1 factoring of large bleeding edge Mersenne numbers having a great deal of RAM matters. If you have a superduper graphics card you can also use that to crunch primes. HTH
Last fiddled with by paulunderwood on 20170702 at 23:30 
20170703, 01:37  #3 
"Rashid Naimi"
Oct 2015
Remote to Here/There
2×1,009 Posts 
Disclaimer: I have no record primes under my name.
Having said that I still beg to differ. That is a good question. The fact that primo can do multithreading is probably an indication that it is not impossible to come up with hardware and software that can use multiple cores/processors/CPUs to test for primality. Primality testing is the main part of finding primes, is it not? My question is, is LL test parallelable? If so then IMHO the most efficient hardware for finding primes would not be a PC, but rather a multiprocessor custom hardware built just for this task. The main challenge with that is the complexity of arbitrary precession capability to be programmed in low levels. Challenging but not impossible. Last fiddled with by a1call on 20170703 at 01:38 
20170703, 01:55  #4 
"Forget I exist"
Jul 2009
Dumbassville
2^{6}·131 Posts 
Sure, in theory. All it is ( without regard to primality just the basis of the algorithm), is a connection of values 2 less than the quadratic residues mod a value, strung together. You could, calculate all the quadratic residues2, restring them together and get an answer. But, to do so, the average one would possibly be as large as the square root of the value being tested so about 35 MB for a 70 million exponent there are about 2^(35 million) of these in theory if no duplicates for x below the square root happen. So to store them all, would take about 35 * 2^35000000 Mb = about 35*10^10536049 Mb or about ... yotta .. yotta bytes ... with a lot of yotta prefixes together just to stop me from needing to flood the forum with the amount.
Last fiddled with by science_man_88 on 20170703 at 02:24 Reason: megabits not megabytes still makes it huge though. 
20170703, 02:25  #5 
"Rashid Naimi"
Oct 2015
Remote to Here/There
2018_{10} Posts 
Hey SM, shouldn't you be out and about celebrating Canada day?
Being far from an expert on the LL test, I believe the action on each loop is a factor of the results of the previous loop. But it is still perhaps, conceivable to have an architecture where some threads predict the results of earlier loops and fetch the results in case the prediction is true. But I am open and interested in corrections on this. Last fiddled with by a1call on 20170703 at 02:26 
20170703, 02:34  #6  
"Forget I exist"
Jul 2009
Dumbassville
2^{6}×131 Posts 
Quote:
then stringing these together from a start of 4 we get the next result is and because this happened at the correct time. Last fiddled with by science_man_88 on 20170703 at 02:40 

20170703, 08:05  #7 
"Rashid Naimi"
Oct 2015
Remote to Here/There
2×1,009 Posts 
One predictive behavior is that values with valuations relative to 2, of 3 or more would be very rare and can only occur immediately after the running register is greater than the candidate. Any subsequent values which are less than the candidate will have a valuation relative to 2, of 2 or less. Not a major reduction in the possibilities but perhaps other approaches are feasible.
For example any upcoming running register value can only have 2, or factors of the multiple of the candidate in mod operation, with the current running register value. Last fiddled with by a1call on 20170703 at 08:15 
20170703, 12:04  #8  
"Forget I exist"
Jul 2009
Dumbassville
2^{6}·131 Posts 
Quote:
notice anything about the coloring and what happens in those area's. Last fiddled with by science_man_88 on 20170703 at 12:11 

20170703, 13:20  #9 
"Rashid Naimi"
Oct 2015
Remote to Here/There
2·1,009 Posts 
I think you have too many steps combined. My point is any number with a valuation of 3 or more minus 2 will result in a number with a valuation of 2. While valuations of 2 or less can only yield valuations of 2 or less. So for very large numbers, the next number to be squared and subtracted by 2 before it grows larger than the input candidate, it will result in valuations of 2 or less.
All valuations are with respect to number 2. To clarify further until the mood operation yields the same number which is ether case when the running register is less than input n, the valuations are predictable. 
20170703, 13:28  #10  
"Forget I exist"
Jul 2009
Dumbassville
2^{6}×131 Posts 
Quote:
Last fiddled with by science_man_88 on 20170703 at 13:39 

20170703, 13:42  #11 
"Rashid Naimi"
Oct 2015
Remote to Here/There
2·1,009 Posts 
Yes when the mod operation involves subtraction of a multiple of p the result is unpredictable, but as long as it does not involve a subtraction and returns the input value which is the case while p^2 is less than the candidate the result of subtracting 2 is predictable in a chain of any length.

Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Combining low quality random numbers sources  only_human  Miscellaneous Math  3  20160520 05:47 
Combining Msieve with CADO NFS  mfeltz  Msieve  10  20160316 21:12 
cpus running at 10%  wildrabbitt  Information & Answers  9  20150120 13:31 
Whither Older CPUs?  Rodrigo  Operation Billion Digits  4  20101020 15:12 
Combining NewPGen files?  roger  Riesel Prime Search  4  20080115 00:01 