View Single Post
2008-04-26, 06:56   #10
mdettweiler
A Sunny Moo

Aug 2007
USA (GMT-5)

3·2,083 Posts

Quote:
 Originally Posted by tnerual with large number of k (>300), forget about sr2sieve ! only use srsieve i have 2000k left in my base 31 file and i can't use sr2 sieve (after 300k, i'm at 1.5 GB of memory used) the problem is the legendre symbol table that is too big ...
With the recent updates to sr2sieve, though, it's now faster even for lots of k's. For example, in the NPLB doublecheck team-sieve (with 500 k's) that I ran a while back, we found that sr2sieve was faster.

Of course, though, as you said, if you have too many k's in the sieve, memory usage becomes a problem. In that case, of course, srsieve is your only option.
Quote:
 Originally Posted by KEP 2 things. 1. Maybe you can PM me how you got started using srsieve, since I don't seem to be able to get it started. So would you be kind enough to tell me how you got started?... you doesn't have to PM me you can also tell me here :) 2. Also can't sr2sieve be told not to build the legendre table if it seems to take up all the memory? Now about my first question to Mr a :), I found the answer myself, and I'm assuming that I should be able to go directly to sr2sieve.exe, if this is wrong please correct me.
Okay, here's what you have to do:

1) In your srsieve folder, make a new text file called "equations.txt" or something along those lines. Open it in a text editor, and list each k you want in the sieve on its own line, like this:
Code:
100*3^n-1
200*3^n-1
300*3^n-1
and et cetera, for all the k's in your sieve. Save the file and close it.

2) Make another text file in your srsieve folder, named "run_srsieve.bat" or something like that. Open it and type the following line, substituting various values where specified:
Code:
srsieve -m 4e9 -n lower end of n-range -N upper end of n-range equations.txt
Save the file, and close it.

3) Double-click on run_srsieve.bat, and you'll see a DOS window pop up, wherein srsieve displays its output. It outputs status reports every minute; below 4G it won't display factors found, but once it gets past 4G it will show every factor found on screen. (Earlier on in the sieve you'll want to minimize the window when you're not watching it, so the computer won't waste CPU time trying to display the factors on screen.) To interrupt srsieve press Ctrl-C, and the DOS window will close.

4) If you interrupt srsieve, it will generate a file called srsieve.out (it also generates this file for backup purposes every 60 minutes even if you don't interrupt it). Rename this to something else, so that it won't write on top of it when you continue the sieve. (I usually name my partially-sieved files based on the date--for example, "Apr26-1.txt" if it's the first file I saved on April 26.) Then, when you want to start srsieve again and continue the sieve, open run_srsieve.bat in a text editor, and change the command line therein to the following:
Code:
srsieve -m 4e9 name of previous sieve file
Replace "name of previous sieve file" with your last copy of the sieve file. Save the file and close it, then double-click on run_srsieve.bat to run srsieve again. It will pick up where it left off and continue with the sieve.

5) Srsieve will output p/sec. and sec./factor rates onscreen, updated every minute. When you've reached a satisfactory factor rate and want to stop the sieve so you can start the PRPing, press Ctrl-C to halt srsieve as before. (There's no need to rename the output file this time, you can leave it at srsieve.out now.) Create a new text file called "srfile.bat". Open it in a text editor, and enter the following line:
Code:
srfile -G srsieve.out
Save and close the file. Then run srfile.bat, and srfile (srsieve's file utility) will convert srsieve.out (your final sieve file) to standard NewPGen format for PRPing. It will probably be called "t16_b3.prp" (the _b3 part will change depending on the base you're doing); rename it to whatever you want, move it to your LLR folder and proceed with the PRPing!

6) You can now go ahead and delete all your intermediate sieve files (there will be one for each time you stopped and restarted srsieve), as well as srsieve.log if you want. You may want to keep the batch files, just remember to change them to the appropriate new values for the next sieve you do.

Hope this helps!

Anon