![]() |
![]() |
#1 |
Sep 2009
99516 Posts |
![]()
Hello,
I've updated factMsieve.pl to support distributed polynomial selection. Use the attached file renamed to remove .txt from the end. Customise paths, number of CPUs, etc. If you are set up to use more than 1 system I recommend setting USE_LOCKDIR to 1, then you can always add helpers if a job is taking too long. Set up a shared directory that all systems can update, put the NAME.n file in it and run factMsieve.pl in it on each system. On the master run as follows: factMsieve.pl NAME.n 1 4 On the helper systems: factMsieve.pl NAME.n 2 4 The "2" should be 3 for the third helper, etc. The last number is the total number of systems. It's actually cosmetic, you don't have to make it the same on all systems. The only vital point is that each system gets a different host number. If you set USE_LOCKDIR to 1 the master doesn't have to know there are any other systems helping it. It is safe to start the helpers before the master. Eg if the master is doing the linear algebra on the previous number. It will work fine if the systems have different speeds. Eg 6 core master and 2 core helper. It also copes with "matrix needs more columns than rows" and sieves a few more records. This isn't tested very well, I can't make it happen when I want it to. Chris K PS. The code in it to automatically start helper systems isn't tested. It should work but I can't guarantee it. Last fiddled with by chris2be8 on 2011-06-10 at 17:26 Reason: Added PS. |
![]() |
![]() |
![]() |
#2 |
Sep 2009
11·223 Posts |
![]()
Hello,
Here's my latest version. Enhancements are: Allow users to specify the range of leading coefficients to search during polynomial selection. You can either put it into factMsieve.pl or into NAME.n (lcmin: lcstep: or lcmax:). You can put logs etc into another dir from the data files. Eg a local dir on helpers to reduce network load. You can do line sieving on one of the helper systems by setting DOCLASSICAL=2 (only on 1 helper though!) You get best overall throughput if you do it on a single core system that can't run the 64 bit lattice sieve (and that's probably the only case where it's a clear benefit). I have several items on my to-do list. But I'm short of time to work on them. Chris K |
![]() |
![]() |
![]() |
#3 |
Sep 2009
22×5×72 Posts |
![]()
Great
![]() |
![]() |
![]() |
![]() |
#4 |
Sep 2009
11×223 Posts |
![]()
A small fix, check that the paths to binaries etc are correct before polynomial selection, so you don't come back to a job and find it halted after polynomial selection ended because the path to the lattice siever is wrong. This version checks the paths before checking how many parms it's passed, so running it without parms will tell you if it can find its programs etc.
Another minor enhancement, it no longer uses cat (really just tidying up). Chris K |
![]() |
![]() |
![]() |
#5 |
Sep 2009
99516 Posts |
![]()
A few more fixes:
It always checks it can find def-par.txt, even if $CHECK_BINARIES=0. It does not save the factor base when sieving below alim/rlim. It will save the factor base (name.afb.[01]) into logdir if you specify logdir. Which is more network friendly. Fix a few bugs running with only 1 CPU. Optionally check the factors are prime with ECPP. Linux only though. While writing that I found that the factor base is always called the name of the job file with .afb.[01] on the end. The -b option is just another way to say what the job file is called. So putting the factor base into logdir requires the job file to be generated there too. Chris K PS. Does anyone know what the -M, -P, -i and -t flags tell gnfs-lasieve4e.c to do? I don't know C well enough to work it out from the code. Last fiddled with by chris2be8 on 2011-09-14 at 16:35 Reason: Correct spelling. |
![]() |
![]() |
![]() |
#6 |
Sep 2009
11·223 Posts |
![]()
Hello,
The latest version which should be 2-3% faster on the helper systems because: Helpers do special-Q ranges 1/10 as large as the master. So they don't do as much wasted sieving after the master has built the matrix. Helper threads start a new range as soon as they finish a range, instead of waiting for all threads to end their range before starting a new set of ranges. So all CPUs are busy all the time. Classical sieving will be done on 1 CPU wile the others do lattice sieving. It's still not much use but at least won't slow sieving down (the previous version was slower on a multi-CPU system). I'm looking for a way to multi-thread trial post processing and sieving. But it's not easy to ensure it'll be an improvement. Happy factoring and Happy Christmas! Chris K |
![]() |
![]() |
![]() |
#7 |
"Carlos Pinho"
Oct 2011
Milton Keynes, UK
5·1,033 Posts |
![]()
Using your script under windows gnfs-lasieve siever runs at normal priority. How do I set it to idle priority?
Code:
# Run the binaries at low priority? my $NICE="what to add here to run binaries at low priority"; #my $NICE="nice -n 19 "; |
![]() |
![]() |
![]() |
#8 | |
"Frank <^>"
Dec 2004
CDP Janesville
1000010011002 Posts |
![]() Quote:
Code:
start /b /low /wait <command here> <params here>" |
|
![]() |
![]() |
![]() |
#9 |
"Carlos Pinho"
Oct 2011
Milton Keynes, UK
5·1,033 Posts |
![]()
I already tried that under Vista without success.
|
![]() |
![]() |
![]() |
#10 |
Oct 2004
Austria
2·17·73 Posts |
![]()
After opening the command window, go to the task manager and set the cmd window to lowest priority. When you start ggnfs or whatever from this cmd window afterwards, this process (and each of its child processes) will inherit the idle priority from the cmd window.
|
![]() |
![]() |
![]() |
#11 | |
"Frank <^>"
Dec 2004
CDP Janesville
1000010011002 Posts |
![]() Quote:
I found one way to do it.....but the cmd window hangs around. Put the siever command line in a .bat file and do it this way: |
|
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Polynomial selection | Max0526 | NFS@Home | 9 | 2017-05-20 08:57 |
SNFS Polynomial selection help? | mhill12 | Factoring | 59 | 2013-09-09 22:40 |
Best way to scale polynomial selection | pastcow | Msieve | 6 | 2013-05-08 09:01 |
2^877-1 polynomial selection | fivemack | Factoring | 47 | 2009-06-16 00:24 |
Polynomial selection | CRGreathouse | Factoring | 2 | 2009-05-25 07:55 |