20210718, 06:02  #1 
Aug 2020
79*6581e4;3*2539e3
419 Posts 
How to testsieve
How is test sieving done with CADO? I thought to just start it normally and have it sieve for a defined time or percentage, but that doesn't measure how strongly yield will decrease at larger q. How is it usually done?

20210718, 17:25  #2 
I moo ablest echo power!
May 2013
3·5·7·17 Posts 
You can set the minimum qvalue in the parameters along with the number of qvalues in each workunit. When I was testsieving different parameters, I would just start a "new" run of the number with the updated parameter values and see how many relations per q I got.
You should be able to do the same thing, but using different minimum qvalues to probe as desired. 
20210718, 17:47  #3  
Apr 2020
546_{10} Posts 
Quote:
If you're not going to be changing the parameters much then what wombatman suggests should be fine. If you're going to be testing lots of different settings, especially on large jobs, you might get frustrated at the length of time CADO takes to generate free relations at the start of each job, when they aren't even used until filtering. In this case you may want to testsieve manually. Here's how to do that. You will need to use the makefb and las binaries, located in the cadonfs/build/[machine name]/sieve directory. First run a command like Code:
makefb poly [path to poly file] lim [largest lim1 you might use] maxbits [largest I you might use] out [path to output file] t [threads] Then, to testsieve, run Code:
las poly [path to poly file] I [I] q0 [start of Q range] q1 [end of Q range] lim0 [lim0] lim1 [lim1] lpb0 [lpb0] lpb1 [lpb1] mfb0 [mfb0] mfb1 [mfb1] fb1 [path to factor base file] out [path to output file] t [threads] statsstderr Last fiddled with by LaurV on 20210719 at 04:19 Reason: fix runaway code tag 

20210719, 09:14  #4 
Aug 2020
79*6581e4;3*2539e3
419 Posts 
Ah, thanks. Is there any good advice on which qranges to test? If the dependence of relation yield to q is linear, just the beginning and end should suffice, is it like that?

20210719, 13:40  #5 
Apr 2020
2·3·7·13 Posts 
Unfortunately it's not linear. It depends on the degree of the polynomial and which side you're sieving on (which reminds me: sqside is another important optional command line flag for las), and there should be some effect from the size of the norms too. I would pick, say, 5 different Q values and interpolate between those. Note that very low Q values give very high yields but will lead to high duplication rates, so there is a tradeoff.

20210719, 15:57  #6 
Sep 2009
895_{16} Posts 
I'm not sure if this applies to CADONFS, but with the ggnfs sievers used by NFS@Home yield often peaks or at least changes trend when specialQ is the same as the factor base size on the side you are sieving (the siever cuts the factor base size down to specialQ when sieving below factor base size). So you should always sieve one range at the factor base size as well as the start and end of the range you hope to sieve on (and as many intermediates as you have time for), then you can assume yield varies linearly between points where you test sieved.
It's not exact since yield isn't precisely linear but usually near enough to do the job. And gets more accurate if you sieve more ranges with smaller gaps between them. Chris 
20210719, 16:15  #7 
"Curtis"
Feb 2005
Riverside, CA
13CD_{16} Posts 
CADO, like the "f" sievers from GGNFS, can sieve Q below the factor base without altering the factor base. So, this advice is not necessary when testsieving in CADO.

20210719, 16:28  #8 
Aug 2020
79*6581e4;3*2539e3
419 Posts 
Ok, thanks everyone. The sieving times for 1281979*2^n+1 suddenly increased strongly from about 5 h at n = 578 to 9 h for n = 590. In terms of time that places the SNFS174 as a GNFS135 while the SNFS177 was already like a GNFS139.
Rational side sieving is still faster, the switch to vbcurtis's c135 parameters helped a bit, but not significantly. Would it make sense to test the number of required relations? For c135 it's 71,000,000 and for c130 only 46,000,000. Or do SNFS and GNFS behave similar in that regard? 
20210719, 16:38  #9  
Apr 2020
2·3·7·13 Posts 
Quote:
Quote:


20210720, 07:19  #10 
Aug 2020
79*6581e4;3*2539e3
419 Posts 
So having an SNFS177 take as long as a GNFS139 really seems a bit long? I thought it might be due to the large coeffcient but the steep increase surprised me.
I was using these (slightly modified c130 params): Code:
lim0 = 5500000 lim1 = 5500000 lpb0 = 30 lpb1 = 29 tasks.sieve.mfb0 = 56 tasks.sieve.mfb1 = 54 tasks.sieve.ncurves0 = 21 tasks.sieve.ncurves1 = 19 tasks.sieve.lambda0 = 1.81 tasks.sieve.lambda1 = 1.80 tasks.I = 13 tasks.sieve.qrange = 5000 tasks.qmin = 120000 tasks.sieve.rels_wanted = 46000000 tasks.sieve.sqside = 0 Code:
lim0 = 13000000 lim1 = 13000000 lpb0 = 30 lpb1 = 30 tasks.sieve.mfb0 = 58 tasks.sieve.mfb1 = 56 tasks.sieve.ncurves0 = 21 tasks.sieve.ncurves1 = 17 tasks.sieve.lambda0 = 1.91 tasks.sieve.lambda1 = 1.82 tasks.A = 26 tasks.sieve.qrange = 10000 tasks.qmin = 500000 tasks.sieve.rels_wanted = 71000000 tasks.sieve.sqside = 0 Last fiddled with by bur on 20210720 at 07:20 
20210720, 09:46  #11 
Aug 2020
79*6581e4;3*2539e3
1A3_{16} Posts 
Btw, I had 75% uniques with the c135 params for one number, I think this is relatively high? It's good, but maybe it still gives a hint what could be optimized?

Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
I found the primality test, there seems to be no composite numbers that pass the test  sweety439  sweety439  7  20200211 19:49 
Modifying the Lucas Lehmer Primality Test into a fast test of nothing  Trilo  Miscellaneous Math  25  20180311 23:20 
Advantage of lattice sieve over line sieve  binu  Factoring  3  20130413 16:32 
Double check LL test faster than first run test  lidocorc  Software  3  20081203 15:12 
A primality test for Fermat numbers faster than Pépin's test ?  T.Rex  Math  0  20041026 21:37 