![]() |
What's the best way to use PFGW in parallel?
I'm trying to find a (probable) prime of the form 2[SUP]n[/SUP] - 2293. What's the best way for me to use a multicore machine to check candidates?
Should I just split the sieved list into 4-8 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 [i]cores[/i] switch would be great, but I don't imagine I'm that lucky... |
[quote=CRGreathouse;227845]I'm trying to find a (probable) prime of the form 2[sup]n[/sup] - 2293. What's the best way for me to use a multicore machine to check candidates?
Should I just split the sieved list into 4-8 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 [I]cores[/I] switch would be great, but I don't imagine I'm that lucky...[/quote] Using a script to dole out the pairs to x files in a round-robin fashion as you described would be the most effective way to balance load across multiple cores without resorting to a client-server setup; NewPGen has a built-in tool for doing this but I don't suppose it works with the kind of numbers you're testing. 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 Ctrl-C, 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^n-2293 can be easily converted to that form as 1*2^n-2293. 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 co-admin, we use PRPnet (and its predecessor LLRnet--long story) to distribute our large-scale 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 interested--if you're interested, just [EMAIL="max@noprimeleftbehind.net"]send me[/EMAIL] the sieve file and I can get a server set up in no time. Max :smile: |
Exponent Testing
[QUOTE=CRGreathouse;227845]I'm trying to find a (probable) prime of the form 2[SUP]n[/SUP] - 2293. What's the best way for me to use a multicore machine to check candidates?
Should I just split the sieved list into 4-8 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 [i]cores[/i] switch would be great, but I don't imagine I'm that lucky...[/QUOTE] If you want to manually test exponents, test exponents >11 congruent to 1 mod 4. Proof: if n is 0 or 2 mod 4, 2^n-2293 is divisible by 3. If n is 3 mod 4, 2^n-2293 is divisible by 5. |
[QUOTE=PawnProver44;428175]If you want to manually test exponents, test exponents >11 congruent to 1 mod 4. Proof:
if n is 0 or 2 mod 4, 2^n-2293 is divisible by 3. If n is 3 mod 4, 2^n-2293 is divisible by 5.[/QUOTE] Sieving and trial division are standard pretesting procedure. Your "proof" is equivalent to sieving to 5; a sieve to billions or trillions is common, the depth determined by the size of the candidate (and corresponding PRP-test time). A sieve is performed on a list of candidates, while trial division is the same concept performed on one candidate at a time. |
A [URL="http://www.mersenneforum.org/showpost.php?p=183260&postcount=15"]post from 2009[/URL] 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. [URL="http://www.mersenneforum.org/showpost.php?p=183260&postcount=15"] [/URL] |
| All times are UTC. The time now is 23:19. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.