mersenneforum.org How to use sr2sieve
 Register FAQ Search Today's Posts Mark Forums Read

 2007-03-10, 19:41 #1 nuggetprime     Mar 2007 Austria 30210 Posts How to use sr2sieve Hello, can anyone tell me how to use sr2sieve to sieve riesel primes? Many people tell it's so fast so I want to use it. But the program needs a riesel.dat file and I couldn't make such one. nuggetprime
 2007-03-10, 21:04 #2 jasong     "Jason Goatcher" Mar 2005 3×7×167 Posts If you want to help out the Riesel Sieve project,(apologies if I'm wrong) your best bet is to download BOINC and attach to boinc.rieselsieve.com . They've just recently begun using sr2sieve in their sieving efforts, so you'll get what you want with only a little bit of hassle.
 2007-03-10, 22:31 #3 Cruelty     May 2005 22×11×37 Posts nuggetprime what do you have as an input? Several NewPGen files? Single NewPGen file? If you have a single NewPGen file then sr1sieve will work directly with it. If you have several NewPGen files (you are sieving several k simultaneously) then you have to convert them first to ABCD format using srfile utility (part of srsieve package) and name it sr2data.txt. Then you create file sr2work.txt, which will have two numbers per each line separated with comma, e.g.: Code: 1000,2000 Above would mean that sr2sieve will sieve sr2data.txt from p=1000*10^9 till 2000*10^9. For more info consult help files of srfile, srsieve, sr1sieve, sr2sieve and sr5sieve - information is a little bit scattered
 2007-03-11, 00:11 #4 geoff     Mar 2003 New Zealand 100100001012 Posts Note that with recent versions of sr2sieve can use the -i, -p, -P options in the same way as sr1sieve, so you don't have to create sr2work.txt. (The -r and -s switches are just needed to interpret the .dat files, because there is no information in the file to distinguish Riesel from Proth numbers. If you use an ABCD format file then -r and -s are not needed.)
 2007-03-13, 14:01 #5 nuggetprime     Mar 2007 Austria 2·151 Posts Thank you! sr1sieve and sr2sieve are now working. Is there a speed change between NewPGen and them? nuggetprime
 2007-03-13, 21:26 #6 Cruelty     May 2005 22×11×37 Posts It depends on k you are sieving, but improvements in my case range from ~15% to double or almost tripple the NewPGen speed (the later achieved using "k8" executables under linux).
 2007-03-14, 05:47 #7 VBCurtis     "Curtis" Feb 2005 Riverside, CA 732 Posts nugget: With P4 versions (fastest that run under Windows, on Athlon64 or P4), the speedup while sieving a single k with sr1sieve ranges from 40% to 90% for most k. An additional 60% or so is available if you run a 64-bit version of linux (I installed Suse64 for this reason on a Conroe). sr2sieve is slower on a single k than sr1, but efficiency rises roughly with the square root of number of k's sieved at once with sr2. In other words, sieving 4 k's at once will be twice as fast as sieving each of the 4 individually with sr1. This is a rough rule of thumb, and again varies with choice of k. Also, sr2sieve sieves the entire range of n for all k's in the sieve-- you would get no speedup from sieving k1 from 300,000 to 600,000 and k2 from 600,000 to 1M, because their ranges do not overlap (in fact, it would be VERY slow, because it would really be sieving both from 300,000 to 1M, even though candidates are not there over the whole range). This is a byproduct of the method used to sieve multiple k's. -Curtis
2007-03-14, 07:42   #8
Patrick123

Jan 2006
JHB, South Africa

157 Posts

Quote:
 Originally Posted by geoff Note that with recent versions of sr2sieve can use the -i, -p, -P options in the same way as sr1sieve, so you don't have to create sr2work.txt. (The -r and -s switches are just needed to interpret the .dat files, because there is no information in the file to distinguish Riesel from Proth numbers. If you use an ABCD format file then -r and -s are not needed.)
In one of your previous postings, http://www.mersenneforum.org/showpos...9&postcount=67
You mentioned that srsieve is faster up to 32 bit? Is this still true?

Based off your instructions, I created a little bat file which automates the whole process, this should help some people getting into the RPS.

Code:
srsieve -s 10 -v -a -P 4e9 -n 290e3 -N 500e3 "AAA*2^n-1" "BBB*2^n-1"
ren sr_2.abcd sr2data.txt
sr2sieve -v
ren sr2data.txt sr_2.abcd
srfile -a -k factors4.txt sr_2.abcd
srfile -G sr_2.abcd
Simply save it as a .bat file and modify the first line with your own parameters.

Regards
Patrick

2007-03-15, 01:45   #9
geoff

Mar 2003
New Zealand

115710 Posts

Quote:
 Originally Posted by Patrick123 You mentioned that srsieve is faster up to 32 bit? Is this still true?
On 32-bit machines srsieve uses 32-bit arithmetic for sieving below 2^32 and then switches to 64-bit arithmetic above 2^32. sr1sieve and sr2sieve use 64-bit arithmetic for everything. Whether the faster arithmetic of srsieve below 2^32 overcomes the better algorithm of sr2sieve is hard to guess, but sieving up to 2^32 takes only a small fraction of the total sieve time in most cases anyway.

Quote:
 ren sr_2.abcd sr2data.txt sr2sieve -v ren sr2data.txt sr_2.abcd
You can simplify this a bit with newer sr2sieve versions: remove the ren statements and add `-i sr_2.abcd' to the sr2sieve parameters.

 2007-03-15, 14:03 #10 nuggetprime     Mar 2007 Austria 30210 Posts On k=19217385 NewPGen is a litte bit faster than sr1sieve! sr1sieve rate ~ 1500k per sec. NewPGen rate ~ 2000k per sec. I'm running windows and I have a 3.2 GHZ P4. I'm running sr1sieve for P4. nuggetprime Last fiddled with by nuggetprime on 2007-03-15 at 14:04
2007-03-15, 14:19   #11
Cruelty

May 2005

31348 Posts

Quote:
 Originally Posted by nuggetprime sr1sieve rate ~ 1500k per sec. NewPGen rate ~ 2000k per sec.
That is odd, but then again, P4 is not best suited for factoring / sieving jobs
BTW: did you use newest executables (1.0.14)? Try with both AMD and Intel versions... Also try sieving complete range of "p" and measure the total time it takes NewPGen and sr1sieve to complete it.

 Similar Threads Thread Thread Starter Forum Replies Last Post pepi37 Software 5 2013-08-09 22:31 SaneMur Information & Answers 2 2011-08-21 22:04 mgpower0 Prime Sierpinski Project 54 2008-07-15 16:50 geoff Prime Sierpinski Project 4 2007-12-16 00:25 BlisteringSheep Sierpinski/Riesel Base 5 172 2007-07-06 21:29

All times are UTC. The time now is 13:41.

Thu Jun 30 13:41:38 UTC 2022 up 77 days, 11:42, 0 users, load averages: 2.19, 1.95, 1.96