![]() |
![]() |
#1 |
"Bob Silverman"
Nov 2003
North of Boston
22·1,877 Posts |
![]()
I am currently sieving 2,2166L.
I have been slowed down somewhat by electrical system shutdowns and network shutdowns for maintenence. However, my biggest slowdown has been a mis-estimate for the input parameters. I am using factor base bounds of 86million and 14million for the rational and algebraic polynomials respectively. I am using 30 bit large primes for both, and a sieve region of 8K x 16K for each special q. I had orginally estimated that I would need about 12 million special q's. I am already at 14 million and have only about 77% of the needed relations. Further, the yield rate is now quite low: only about 3.2 relations per q. I am going to have to do quite a bit more sieving that I anticipated. YECH. |
![]() |
![]() |
![]() |
#2 |
"Bob Silverman"
Nov 2003
North of Boston
750810 Posts |
![]()
I just found an interesting bug in my siever. I discovered it while
making some improvements, including a larger sieve region. Here is one instance. For special_q = 256300217 with root 137499035, my lattice reduction routine returned (36738082, 6593) (137499035, 1) This is not correct. The problem, of course is integer overflow. The routine uses signed ints. Of course, since the reduced lattice is wrong, everything that follows is wrong and no relations get produced. I had been getting a very low relation yield rate for the larger special q's on my current factorization. This explains it. I've been losing valid relations. I am going to have to change the latred routine to use 64 bit ints. |
![]() |
![]() |
![]() |
#3 | |
"Bob Silverman"
Nov 2003
North of Boston
22·1,877 Posts |
![]() Quote:
We hope that norm(c + d alpha) is smooth. Let v1, v2 be the reduced lattice row vectors for some special_q. Then (c,d) = i*v1 + j*v2 where (i,j) is a point in the reduced lattice. i and j are bounded by the size of the sieve region, but for large special_q, it is possible that eiither i*v1 or j*v2 (or both) may overflow, giving a wrong value for c and/or d when they are defined as signed 32-bit ints. I will need to deal with this as well. Does anyone know if GGNFS uses 64-bits for any/all of these variables? For 2,2166L, I am now sieving special_q near 250 million. The average yield is now only about 3 relations/q. A fair fraction of the q's produce no relation at all. I may need to fix my code, and go back and RESIEVE a large set of q's that I have already done. |
|
![]() |
![]() |
![]() |
#4 | |
"Bob Silverman"
Nov 2003
North of Boston
22·1,877 Posts |
![]() Quote:
thinking about the difficulties. It is clear that I need to fix the lattice reduction. However, the problem with (c,d) possibly overflowing still remains. It would take a MAJOR rewrite to allow (c,d) to exceed 32 bits. And the CWI tools can only handle 30-bit (c,d) as well. It is also how to proceed with my current effort. I can let the siever keep running, on ever-larger special q's. But the yield rate will only get worse. At the current rate I will need to sieve another 6 million special q's. I have already sieved through 14 million of them. Or I can fix the latred problems (which will take time) and go back and resieve q's that have already been done. I have reserved 2,1870L, but may have to release it until I can fix my siever. |
|
![]() |
![]() |
![]() |
#5 |
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
89·113 Posts |
![]()
In redu2.c, the GGNFS/Franke siever uses double in the variant of the code that is used by practically everyone. However, the very latest version has the gmp mpz_t version:
int reduce2(i32_t*,i32_t*,i32_t*,i32_t*,i64_t,i64_t,i64_t,i64_t,double); int reduce2gmp(i64_t*,i64_t*,i64_t*,i64_t*,mpz_t,mpz_t,double); Code:
@ Note that we dont use lattice reduction to organize sieving with the factor base primes which are larger than the line length. Instead, we use a method based on the relation with continued fractions and diophantine approximations. Therefore, the code contained in this file is not time crtitical. @(redu2.h@>= int reduce2(i32_t*,i32_t*,i32_t*,i32_t*,i64_t,i64_t,i64_t,i64_t,double); int reduce2gmp(i64_t*,i64_t*,i64_t*,i64_t*,mpz_t,mpz_t,double); @ This is done in the straigthforward way. A basis is given by the fifth to eighth argument (|a0|,|b0|), (|a1|,|b1|). The reduced basis is written to the addresses given by the first four arguments. The ninth argument will often be larger than 1 an punishes large |b|. As a safeguard against numerical instability, the scalar products are recalculated from the modified vectors after each reduction step and not updated in a way which would save multiplications. Note again that this function is not likely time critical for lattice sieving. The scalar products of the two vector with themselves are called |a0sq| and |a1sq|. Their scalar product is called |s|. |
![]() |
![]() |
![]() |
#6 | |
May 2008
109510 Posts |
![]() Quote:
Assuming you are sieving the special-q on the rational side, I think it should not be too difficult to allow composite special-q's (on the algebraic side it would take more work). Might be worth doing as a quick measure to finish your current job. |
|
![]() |
![]() |
![]() |
#7 | |
"Bob Silverman"
Nov 2003
North of Boston
750810 Posts |
![]() Quote:
If norm(a + balpha)/(pq) is smooth, it will have been found with either special_q = p, or special_q = q (or both!) |
|
![]() |
![]() |
![]() |
#8 | |
"Bob Silverman"
Nov 2003
North of Boston
1D5416 Posts |
![]() Quote:
single precision ints? Even if I fix the latred problem, I am still faced with losing valid relations (c,d) = i * V1 + j * V2, when the multiplications overflow 32 (signed) bits. |
|
![]() |
![]() |
![]() |
#9 |
Tribal Bullet
Oct 2004
1101111000112 Posts |
![]()
Msieve doesn't have a lattice sieve at all. Both the line sieve and the postprocessing can handle 63-bit signed 'a' and 32-bit 'b' values.
Perhaps the most expedient solution is to use the Kleinjung siever to resieve enough, then postprocess the generated relations into CWI format (which is easy). |
![]() |
![]() |
![]() |
#10 | |
"Bob Silverman"
Nov 2003
North of Boston
750810 Posts |
![]() Quote:
|
|
![]() |
![]() |
![]() |
#11 | |
"Bob Silverman"
Nov 2003
North of Boston
11101010101002 Posts |
![]() Quote:
of Visual Studio at work produces code that seg-faults with a release (non-debug) version. The debug version runs just fine, albeit slower. I will need to rebuild everything on my home PC. I have encountered (and reported on) this problem before. |
|
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
MPQS b-parameter and Pell-like equations | Till | Abstract Algebra & Algebraic Number Theory | 13 | 2017-01-20 21:12 |
Primenet Error 7: invalid parameter | Unregistered | Information & Answers | 2 | 2012-10-06 00:33 |
changing mprime's WorkerThreads parameter? | ozturkfa | Information & Answers | 7 | 2012-04-03 16:19 |
PrimeNet error 7: Invalid parameter | JohanSeland | Software | 4 | 2009-07-24 23:58 |
ECM Work and Parameter Choices | R.D. Silverman | Cunningham Tables | 11 | 2006-03-06 18:46 |