20100831, 03:48  #1 
Aug 2006
1011101100011_{2} Posts 
What's the best way to use PFGW in parallel?
I'm trying to find a (probable) prime of the form 2^{n}  2293. What's the best way for me to use a multicore machine to check candidates?
Should I just split the sieved list into 48 parts? This is not quite the best approach: it would be easiest to dole out sequential chunks, but then balancing load is hard. I could write a script to move the first, fifth, ... or first, ninth, ... numbers to their own file; maybe that's the best, though it's a pain if I discover that I need k of the cores for some other purpose and I can't support that many tasks anymore. Also, ideally there would be a way to end the processes if any one of the searches found a prime, but I'm prepared to do this manually since I imagine it will be a while. A j cores switch would be great, but I don't imagine I'm that lucky... Last fiddled with by CRGreathouse on 20100831 at 03:49 
20100831, 04:38  #2  
A Sunny Moo
Aug 2007
USA (GMT5)
3×2,083 Posts 
Quote:
What would provide the most flexibility is to run a PRPnet server. PRPnet is a client/server system for primality testing of numbers of various forms that supports the use of LLR, PFGW, Phrot, and genefer to do the underlying computations. You feed the sieve file into the server, and when clients connect to it, they're given the next untested number on the list to run. When that's done the result is returned to the server and logged; the client then grabs another number from the server ad infinitum. Stopping a client via CtrlC, flipping an option in its configuration file, and running it again is all that's needed to clean out the pairs in its local queue (informing the server that it can hand them out to other clients instead) and free up that core for other work. PRPnet should be able to handle the numbers you're doing pretty easily. It's designed primarily for numbers of the form k*b^n+c, but 2^n2293 can be easily converted to that form as 1*2^n2293. The PRPnet client would be able to do the PRP tests on these using either LLR or PFGW (though it somewhat arbitrarily uses PFGW first for this form if it's available). While setting up a PRPnet server can be a bit of a hassle at first if you're not familiar with how it works, the client is quite easy to use. At the No Prime Left Behind project farther down the forum, which I coadmin, we use PRPnet (and its predecessor LLRnetlong story) to distribute our largescale Riesel prime search efforts to individual members; since we've already got the infrastructure set up to run the servers, it's not much work to add and administrate additional servers. Thus, I have a standing offer to host a PRPnet server on the NPLB site for anyone who's interestedif you're interested, just send me the sieve file and I can get a server set up in no time. Max Last fiddled with by mdettweiler on 20100831 at 04:38 

20160305, 18:58  #3  
"NOT A TROLL"
Mar 2016
California
197 Posts 
Exponent Testing
Quote:
if n is 0 or 2 mod 4, 2^n2293 is divisible by 3. If n is 3 mod 4, 2^n2293 is divisible by 5. 

20160305, 23:36  #4  
"Curtis"
Feb 2005
Riverside, CA
3·1,877 Posts 
Quote:
A sieve is performed on a list of candidates, while trial division is the same concept performed on one candidate at a time. 

20160306, 00:21  #5 
"Dana Jacobsen"
Feb 2011
Bangkok, TH
3^{2}×101 Posts 
A post from 2009 plus a little looking shows that n=24k+1. But as VBCurtis points out, the factors are tiny so they'd be caught by trial factor or a sieve with little effort.
The thread is also almost 6 years old. It'd be nice to hear what any results were. The farthest test I've seen went to 360k, but that's not much more than was done in 2009. 
Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Parallel sieving with newpgen  fivemack  And now for something completely different  3  20170516 17:55 
PFGW 3.3.6 or PFGW 3.4.2 Please update now!  Joe O  Sierpinski/Riesel Base 5  5  20100930 14:07 
Which bits of gmpecm are now parallel?  fivemack  GMPECM  5  20100905 06:49 
Parallel memory bandwidth  fivemack  Factoring  14  20080611 20:43 
Parallel Prime Search  DonaldTripp  Software  2  20070217 19:35 