mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > Msieve

Reply
 
Thread Tools
Old 2013-11-26, 19:11   #1
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

354110 Posts
Default Fixing the large dataset bug

Several of you have huge datasets lying around, for which the filtering in Msieve produces unusable matrices or even flat out crashes.

Thanks to an observation of RichD, can anyone with such a large dataset (more that about 750M relations) change the following structure at line 133 of include/common.h

Code:
typedef struct {
  uint32 blob_words;
  uint32 hash_words;
  uint32 *hashtable;
  uint32 log2_hashtable_size;
  uint32 num_used;
  uint32 congestion_target;
  uint32 *match_array;
  uint32 match_array_size;
  uint32 match_array_alloc;
} hashtable_t;
to

Code:
typedef struct {
  uint32 blob_words;
  uint32 hash_words;
  uint32 *hashtable;
  uint32 log2_hashtable_size;
  size_t num_used;
  size_t congestion_target;
  uint32 *match_array;
  size_t match_array_size;
  size_t match_array_alloc;
} hashtable_t;
and retry the filtering? I think in the case of singleton removal this will avoid an overflow out of 4GB when the number of ideals exceeds about 2^28.
jasonp is offline   Reply With Quote
Old 2013-11-27, 04:12   #2
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

3,541 Posts
Default

Actually, upon further review it is unlikely the above will fix anything; what I thought was an arrays size is actually a count of array elements, which has a harder time exceeding 2^32.
jasonp is offline   Reply With Quote
Old 2014-06-22, 03:21   #3
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

3,541 Posts
Default

Thanks to chris2be8, I've committed SVN 966 to detect an edge case deep in the finite field rootfinder; without that fix, certain SNFS polynomials would generate invalid free relations that could conceivably cause crashes during singleton removal. This might be a fix for the large dataset bug.

For my edification, is it really true that there are *no* primes p such that x^6+x^5+x^4+x^3+x^2+x+1=0 mod p has 6 linear roots? The fix would imply this is the case, which further implies there are SNFS problems that cannot generate any free relations, which I thought was impossible.
jasonp is offline   Reply With Quote
Old 2014-06-22, 16:20   #4
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Cambridge (GMT/BST)

16F816 Posts
Default

I suppose someone needs to remove all the free relations from a crashing job and run the filtering again.
henryzz is offline   Reply With Quote
Old 2014-06-22, 16:58   #5
fivemack
(loop (#_fork))
 
fivemack's Avatar
 
Feb 2006
Cambridge, England

72×131 Posts
Default

Quote:
Originally Posted by jasonp View Post
Thanks to chris2be8, I've committed SVN 966 to detect an edge case deep in the finite field rootfinder; without that fix, certain SNFS polynomials would generate invalid free relations that could conceivably cause crashes during singleton removal. This might be a fix for the large dataset bug.

For my edification, is it really true that there are *no* primes p such that x^6+x^5+x^4+x^3+x^2+x+1=0 mod p has 6 linear roots? The fix would imply this is the case, which further implies there are SNFS problems that cannot generate any free relations, which I thought was impossible.
If p==1 mod 7, and t is a primitive root mod p, then (t^6)^j is a root of that polynomial for all j; am I missing something?

The polynomial is (x^7-1)/(x-1); if p is not equal to 1 mod 7, then it will have no roots (because a root would be an element of the group of order 7, and 7 does not divide the order of the group!)

Last fiddled with by fivemack on 2014-06-22 at 17:00
fivemack is offline   Reply With Quote
Old 2014-06-23, 00:18   #6
R.D. Silverman
 
R.D. Silverman's Avatar
 
Nov 2003

22×5×373 Posts
Default

Quote:
Originally Posted by jasonp View Post

For my edification, is it really true that there are *no* primes p such that x^6+x^5+x^4+x^3+x^2+x+1=0 mod p has 6 linear roots? The fix would imply this is the case, which further implies there are SNFS problems that cannot generate any free relations, which I thought was impossible.
The Galois group is CYCLIC!!!!!!! (generated by a primitive 7th
root of unity)........

Further hint: consider primes that are 1 mod 7.......
R.D. Silverman is offline   Reply With Quote
Old 2014-06-23, 00:20   #7
R.D. Silverman
 
R.D. Silverman's Avatar
 
Nov 2003

746010 Posts
Default

Quote:
Originally Posted by R.D. Silverman View Post
The Galois group is CYCLIC!!!!!!! (generated by a primitive 7th
root of unity)........

Further hint: consider primes that are 1 mod 7.......
Further hint: Chebotarev Density Thm.

Consider: What is the order of closure for the Galois group?
R.D. Silverman is offline   Reply With Quote
Old 2014-06-23, 03:11   #8
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

3,541 Posts
Default

This failing example has 107 digits; all the primes in the factor base are 1 mod 7. If f(x) = x^6+x^5+x^4+x^3+x^2+x+1, the finite field rootfinder first computes gcd(f(x), x^(p-1)-1) to determine the product of all the linear polynomial roots of f(x) = 0 mod p. However, the second term in the above is always 0, so this test concludes that no p is a root of f(x) = 0 mod p. Without the fix mentioned previously, the gcd would also crash.

That obviously isn't right, since the p chosen for free relations always shadow a p that appers in ordinary relations. So does the rootfinder need a special case to work correctly for polynomials like this f(x)?

Last fiddled with by jasonp on 2014-06-23 at 03:12
jasonp is offline   Reply With Quote
Old 2014-06-23, 12:06   #9
R.D. Silverman
 
R.D. Silverman's Avatar
 
Nov 2003

11101001001002 Posts
Default

Quote:
Originally Posted by jasonp View Post
This failing example has 107 digits; all the primes in the factor base are 1 mod 7. If f(x) = x^6+x^5+x^4+x^3+x^2+x+1, the finite field rootfinder first computes gcd(f(x), x^(p-1)-1) to determine the product of all the linear polynomial roots of f(x) = 0 mod p. However, the second term in the above is always 0, so this test concludes that no p is a root of f(x) = 0 mod p. Without the fix mentioned previously, the gcd would also crash.

That obviously isn't right, since the p chosen for free relations always shadow a p that appers in ordinary relations. So does the rootfinder need a special case to work correctly for polynomials like this f(x)?
'the rootfinder' or 'a rootfinder'???

I can't speak for the first case, since I do not know what the code does,
but the answer for the second case is no. My code has no special cases.
R.D. Silverman is offline   Reply With Quote
Old 2014-06-23, 13:40   #10
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

10111010110112 Posts
Default

Quote:
Originally Posted by fivemack View Post
If p==1 mod 7, and t is a primitive root mod p, then (t^6)^j is a root of that polynomial for all j; am I missing something?
Let p = 29, t = 2, and j = 1. Then p = 1 mod 7 and t is a primitive root mod p but (t^6)^j = 64 = 6 mod 29 is not a root of x^6+x^5+x^4+x^3+x^2+x+1 mod p. Am *I* missing something?

The factorization I see is (x + 4)(x + 5)(x + 6)(x + 9)(x + 13)(x + 22) = (x - 7)(x - 16)(x - 20)(x - 23)(x - 24)(x - 25) mod 29.

Last fiddled with by CRGreathouse on 2014-06-23 at 13:53
CRGreathouse is offline   Reply With Quote
Old 2014-06-23, 13:56   #11
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

3,541 Posts
Default

The rootfinder in the Msieve code, starting on line 703 of here.

Consider p=113. Both wolfram alpha and the code above compute that gcd(f(x), x^112-1) is 1 because the second term in the GCD is zero. But this is supposed to be a polynomial that is a product of all the linear roots of f(x)=0 mod 113. Yet f(x) = 0 mod 113 has roots 16, 28, 30, 49, 106 and 109.
jasonp is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
48-bit large primes! jasonp Msieve 24 2010-06-01 19:14
a^n mod m (with large n) Romulas Math 3 2010-05-08 20:11
NFS with 5 and 6 large primes jasonp Factoring 4 2007-12-04 18:32
Why only three large primes fivemack Factoring 18 2007-05-10 12:14
very large exponents pacionet Data 4 2005-11-04 20:10

All times are UTC. The time now is 00:50.


Sat Jul 17 00:50:58 UTC 2021 up 49 days, 22:38, 1 user, load averages: 1.71, 1.56, 1.43

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.