![]() |
CWI format --> GGNFS format
[QUOTE=tgrdy;225620]
<snip> [/QUOTE] Will someone please give a URL where the conversion code may be found for converting CWI relations --> GGNFS/msieve relations? |
[QUOTE=R.D. Silverman;225651]Will someone please give a URL where the conversion code may be found
for converting CWI relations --> GGNFS/msieve relations?[/QUOTE] Try [url]http://tech.groups.yahoo.com/group/ggnfs/message/843[/url] Oops, thats the other way around |
Try [url=http://www.mersenneforum.org/showpost.php?p=116495&postcount=196]here[/url].
|
1 Attachment(s)
See attached. My web page has similar code, but it is years old and is out of sync with the msieve library. If you need to build from the source, then you will need the msieve source, particularly the include directory, and a precompiled msieve library available. Building the latter also requires GMP or MPIR, so it's not completely straightforward. Without GMP or MPIR, you'll have to paste in the library code that the converter depends on, which is scattered all over the library.
This converter basically reads in an msieve-format factor base file, builds the corresponding factor base, reads CWI format relations and trial divides to find any factors that are not present in the CWI output. The default trial division bound is pretty conservative; to change it you can add 'FRMAX X' and 'FAMAX Y' to the msieve factor base file to set the rational and algebraic factor base limits to X and Y respectively. It can also be made *much* more efficient. Finally, the converter assumes the rational poly is CWI poly 0 and the algebraic poly is CWI poly 1. |
[QUOTE=jasonp;225656]See attached. My web page has similar code, but it is years old and is out of sync with the msieve library. If you need to build from the source, then you will need the msieve source, particularly the include directory, and a precompiled msieve library available. Building the latter also requires GMP or MPIR, so it's not completely straightforward. Without GMP or MPIR, you'll have to paste in the library code that the converter depends on, which is scattered all over the library.
This converter basically reads in an msieve-format factor base file, builds the corresponding factor base, reads CWI format relations and trial divides to find any factors that are not present in the CWI output. The default trial division bound is pretty conservative; to change it you can add 'FRMAX X' and 'FAMAX Y' to the msieve factor base file to set the rational and algebraic factor base limits to X and Y respectively. It can also be made *much* more efficient. Finally, the converter assumes the rational poly is CWI poly 0 and the algebraic poly is CWI poly 1.[/QUOTE] It may be easier for me to just write my own converter. Let me summarize what I know about the format: " a,b:rational side factors:algebraic side factors a,b in decimal. factors in hex (case insensitive), comma separated. you may leave out small factors < 1000. " I assume that the colons are part of the output. I also assume that a count of the number of factors is not needed. Is this correct? msieve just reads the inputs until it encounters a colon? How does it know when it hits the end of a line? i.e. if I have a,b:r11, r12, r13:s11, s12, s13, s14 a,b:r21, r22:s21, s22 How does it know that the second a,b pair are not algebraic factors from the previous relation? I assume it uses <lf> or <cr> as a line terminator. However, I need to know which, since Unix and Windows use different terminators. Or do the algebraic factors also end in a colon? After conversion, does msieve require a *single* input file with all of the relations? Can one do 'type *.dat | msieve ....options" if one has multiple input files? Does msieve kick out an output file consisting of the combined relations that come out of the filtering process? I assume that it kicks out a matrix file for restart in case the LA gets interrupted? |
[QUOTE=R.D. Silverman;225665]It may be easier for me to just write my own converter. Let me
summarize what I know about the format: " a,b:rational side factors:algebraic side factors a,b in decimal. factors in hex (case insensitive), comma separated. you may leave out small factors < 1000. " I assume that the colons are part of the output. I also assume that a count of the number of factors is not needed. Is this correct? msieve just reads the inputs until it encounters a colon? How does it know when it hits the end of a line? i.e. if I have a,b:r11, r12, r13:s11, s12, s13, s14 a,b:r21, r22:s21, s22 How does it know that the second a,b pair are not algebraic factors from the previous relation? I assume it uses <lf> or <cr> as a line terminator. However, I need to know which, since Unix and Windows use different terminators. Or do the algebraic factors also end in a colon? After conversion, does msieve require a *single* input file with all of the relations? Can one do 'type *.dat | msieve ....options" if one has multiple input files? Does msieve kick out an output file consisting of the combined relations that come out of the filtering process? I assume that it kicks out a matrix file for restart in case the LA gets interrupted?[/QUOTE] I just tried running the converter. Apparently it requires worktodo.ini? What else might it require? |
[QUOTE=R.D. Silverman;225667]I just tried running the converter. Apparently it requires worktodo.ini?
What else might it require?[/QUOTE] I tried 'cwi2gg -c myinputfile' and it also demanded worktodo.ini; I would assume that the converter needs to know N and the polynomial coefficients as well as the factor base limits. However, AFAIK, this information is in msieve.dat, and not 'worktodo.ini'. The source that I have is quite dated. --> 1.35 Have the input files/formats changed? |
[QUOTE=R.D. Silverman;225670]I tried 'cwi2gg -c myinputfile' and it also demanded worktodo.ini;
I would assume that the converter needs to know N and the polynomial coefficients as well as the factor base limits. However, AFAIK, this information is in msieve.dat, and not 'worktodo.ini'. The source that I have is quite dated. --> 1.35 Have the input files/formats changed?[/QUOTE] I tried creating a worktodo.ini for 2,2166L. The converter reports: "Error reading NFS polynomials". (1) Are the coefficients entered left-to-right or right to left? e.g. Is R0: 1 R1: -97 equal to 'x -97' or is it '97x - 1'??? Here is my worktodo file: (named msieve.fb) N:739667156236337946134056937343993499754458397410514879535265138262937772306734758373439043967382639142033110187422219711601230265487881771913909253605105149612106401456200979809373176041694206587071429 skew: 1.0 R0: 1 R1: -1532495540865888858358347027150309183618739122183602176 A0: 4 A1: -4 A2: 2 A3: -2 A4: 1 The algebraic polynomial is 4x^4 -4x^3+2x^2-2x+1, the rational is x - 1532495540865888858358347027150309183618739122183602176 Do I need to reverse the coefficients? What syntax error is present? I tried: cwi2gg -i msieve.fb -c myfile and got the above error. |
[QUOTE=R.D. Silverman;225673]I tried creating a worktodo.ini for 2,2166L. The converter
reports: "Error reading NFS polynomials". (1) Are the coefficients entered left-to-right or right to left? e.g. Is R0: 1 R1: -97 equal to 'x -97' or is it '97x - 1'??? Here is my worktodo file: (named msieve.fb) [CODE]N:739667156236337946134056937343993499754458397410514879535265138262937772306734758373439043967382639142033110187422219711601230265487881771913909253605105149612106401456200979809373176041694206587071429 skew: 1.0 R0: 1 R1: -1532495540865888858358347027150309183618739122183602176 A0: 4 A1: -4 A2: 2 A3: -2 A4: 1 [/CODE] The algebraic polynomial is 4x^4 -4x^3+2x^2-2x+1, the rational is x - 1532495540865888858358347027150309183618739122183602176 Do I need to reverse the coefficients? What syntax error is present? I tried: cwi2gg -i msieve.fb -c myfile and got the above error.[/QUOTE] IIRC, it should be: [CODE]N: 739667156236337946134056937343993499754458397410514879535265138262937772306734758373439043967382639142033110187422219711601230265487881771913909253605105149612106401456200979809373176041694206587071429 skew: 1.0 R1: 1 R0: -1532495540865888858358347027150309183618739122183602176 A4: 4 A3: -4 A2: 2 A1: -2 A0: 1[/CODE] so e.g. A[B]3[/B]: -4 means -4x^[B]3[/B] You also had no "blank" character between "N:" and your number. |
[QUOTE=Andi47;225678]IIRC, it should be:
[CODE]N: 739667156236337946134056937343993499754458397410514879535265138262937772306734758373439043967382639142033110187422219711601230265487881771913909253605105149612106401456200979809373176041694206587071429 skew: 1.0 R1: 1 R0: -1532495540865888858358347027150309183618739122183602176 A4: 4 A3: -4 A2: 2 A1: -2 A0: 1[/CODE] so e.g. A[B]3[/B]: -4 means -4x^[B]3[/B] You also had no "blank" character between "N:" and your number.[/QUOTE] My actual input file did have a space after N: I tried putting the coefficients in reverse order as you suggested (R1, then R0; A4 ....A0) My input file looks exactly like the one above. I still get the error. Could it be a <lf, cr> vs <lf> issue? I am running on Windoze. |
[QUOTE=R.D. Silverman;225679]My actual input file did have a space after N:
I tried putting the coefficients in reverse order as you suggested (R1, then R0; A4 ....A0) My input file looks exactly like the one above. I still get the error. Could it be a <lf, cr> vs <lf> issue? I am running on Windoze.[/QUOTE] Possible (I also had this issue when transferring between windoze and linux). If you created your input with the windows text editor or with winword, you should be OK with <lf, cr> vs. <lf>. And oops, I just see a second issue: 1.) Omit all colons 2.) write "SKEW" in all capital letters. Example: This msieve.fb file worked for me for 2,955+: [CODE]N 164774131143428541455977103890576592781521529987726208400577622823278351072892612844473159928877431421021266080477846336219461802989069886599201120900081 SKEW 4707069.76 R0 -255911427676165480127248839980 R1 246484920163953683 A0 -10081097995700425772496616464526287093 A1 100178560246089231180102467546016 A2 -21818714478295129385422733 A3 -19222762440923505056 A4 745151166906 A5 150120 [/CODE] |
| All times are UTC. The time now is 23:25. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.