mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > Msieve

Reply
 
Thread Tools
Old 2012-08-21, 07:01   #1
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

1C3516 Posts
Default Matrix file format questions

Quote:
Originally Posted by Readme.nfs
For each column, there is a 32-bit word indicating the number of sparse entries in the column, then a list of that many nonzero row positions (each a 32-bit word, with words in arbitrary order), then floor((D+31)/32) words for the dense rows in that column. The latter should be treated as an array of D bits in little-endian word order.
1) When you say "list of row positions", do you mean that the position count includes the dense rows? I.e., for an array of sparse rows (whose length is nrows-dense_rows), if I read in pos, I should store that in the (pos - dense_rows)th row of the array?

2) The array of bits in little endian order: You mean that the first word gives the entries in the 0-7th dense rows? But, confusingly enough, bit shifts work in big endian fashion, so the 0th dense row is (byte0) & 1, the 1st is (byte0>>1) & 1, and the nth column (n < 8) is (byte0>>n) & 1? And then the 8th dense row is byte1 & 1, and the 9th is (byte1>>1) & 1?

Last fiddled with by Dubslow on 2012-08-21 at 07:02
Dubslow is offline   Reply With Quote
Old 2012-08-21, 09:41   #2
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3·29·83 Posts
Default

Whoops, only now did I see this:
Quote:
The sparse entries in each column are numbered from D onward.
I guess that answer's question 1.
Dubslow is offline   Reply With Quote
Old 2012-08-21, 11:33   #3
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

3,541 Posts
Default

The bit positions are chosen so that you can recover bit position X by performing a multiple precision shift-and-mask-bit operation on the dense array for each entry in the matrix. I didn't care about endian-independence; only 5-year-old PowerPCs and the occasional supercomputer are big-endian anymore, and neither of these will restart a LA job that was started elsewhere.
jasonp is offline   Reply With Quote
Old 2012-08-21, 17:41   #4
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

224058 Posts
Default

Quote:
Originally Posted by jasonp View Post
...only 5-year-old PowerPCs and the occasional supercomputer are big-endian anymore, and neither of these will restart a LA job that was started elsewhere.
SGI is dead as disco (not that there was anything wrong with SGI*... or with disco!), and so is DEC Alpha... All the big-endian powerhouses faded away. /sigh/

*I still have a freeze-dried Han Solo SGI Octane in my storage; it may or may not wake up, and I don't have a monitor cable for it anymore (all of its connectors are weird by these days' standards)
Batalov is offline   Reply With Quote
Old 2012-09-12, 22:08   #5
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3×29×83 Posts
Default

Another stupid question:

According to this paper (pg 4) and common sense, given x^2==y^2 mod n, then gcd(x-y,n) might reveal a factor where gcd(x+y,n) doesn't. Why, then, does Msieve only do the latter gcd? (trunk/gnfs/sqrt/sqrt.c, line 486: `mpz_add(tmp1, sqrt_r, sqrt_a); mpz_gcd(tmp1, tmp1, n);` ... )
Dubslow is offline   Reply With Quote
Old 2012-09-13, 11:26   #6
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

3,541 Posts
Default

It used to do both GCDs, but Pari's MPQS code proved that doing one is sufficient; see the comments there.
jasonp is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting CWI format to ggnfs format xilman Msieve 2 2015-11-27 09:54
CWI format --> GGNFS format R.D. Silverman Msieve 25 2013-04-17 07:40
On relations file format Dubslow Factoring 15 2012-08-20 10:05
12+256 matrix job fivemack Factoring 11 2009-08-18 17:39
[Need help] about Matrix Polynomial buan Homework Help 3 2007-07-17 15:07

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


Sat Jul 17 00:54:46 UTC 2021 up 49 days, 22:42, 1 user, load averages: 1.09, 1.34, 1.36

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.