mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   YAFU (https://www.mersenneforum.org/forumdisplay.php?f=96)
-   -   yafu bugs (https://www.mersenneforum.org/showthread.php?t=16667)

Dubslow 2013-02-14 15:23

[QUOTE=bsquared;329455]Which is great, except for if there is *also* a Y0/Y1 in the file :) Then you get two copies of R0 R1.[/QUOTE]

[code]Index: factor/nfs/nfs_filemanip.c
===================================================================
--- factor/nfs/nfs_filemanip.c (revision 304)
+++ factor/nfs/nfs_filemanip.c (working copy)
@@ -898,7 +898,8 @@
{
// convert a ggnfs.job file into a msieve.fb polynomial file
FILE *in, *out;
- char line[GSTR_MAXSIZE], outline[GSTR_MAXSIZE], *ptr;
+ char line[GSTR_MAXSIZE], outline[GSTR_MAXSIZE], *ptr, printed_rat = 0;
+ // assumes linear rational poly

in = fopen(fobj->nfs_obj.job_infile,"r");
if (in == NULL)
@@ -928,13 +929,15 @@
sprintf(outline, "N %s",line + 3);
//else if(line[0] == 's')
// sprintf(outline, "SKEW %s",line + 5);
- else if (line[0] == 'Y')
+ else if (line[0] == 'Y' && printed_rat < 2) {
sprintf(outline, "R%c %s",line[1], line + 4);
- else if (line[0] == 'c')
+ printed_rat++;
+ } else if (line[0] == 'c')
sprintf(outline, "A%c %s",line[1], line + 4);
- //else if (line[0] == 'm' && line[1] == ':')
- // sprintf(outline, "R1 1\nR0 -%s", line + 3);
- else
+ else if (line[0] == 'm' && line[1] == ':' && !printed_rat) {
+ sprintf(outline, "R1 1\nR0 -%s", line + 3);
+ printed_rat = 2;
+ } else
strcpy(outline, "");

fputs(outline,out);[/code]

bsquared 2013-02-14 15:26

:smile:

jasonp 2013-02-14 18:25

Don't build a state machine to try to figure out what the input file means; I think if an m: line appears with Y0/Y1 it's more likely to be a typo or a cut-n-paste error than an actual redundant representation of the rational polynomial, and you'd be within your rights to complain that what you're given is ambiguous.

bsquared 2013-02-14 21:39

What would happen if R0 and R1 were specified twice in the .fb file? If msieve doesn't care, then I can just restore Dubslow's original fix.

While I agree there is some redundancy, I've seen plenty of people specify both rational coefficients and M. If given both, I think ggnfs prefers M. I'm not sure offhand if it does a consistency check between Y and M. But if it doesn't like what it gets it will do the complaining. YAFU's snfs always specifies both (and makes sure they are consistent).

jasonp 2013-02-15 01:46

If a poly coefficient occurs more than once, the last occurrence is the coefficient used.

skan 2013-02-26 01:12

Hi

I've tried the last version, 1.34, on my girlfriend's laptop (with Vista and only 1GB memory) and it crashes after a few seconds.
With small numbers no problem
but when it starts ecm or siqs it crashes (after a while) and Windows says:
[CODE]Problem signature:
Problem Event Name: APPCRASH
Application Name: yafu-Win32.exe
Application Version: 0.0.0.0
Application Timestamp: 512bac78
Fault Module Name: ntdll.dll
Fault Module Version: 6.0.6001.18538
Fault Module Timestamp: 4cb733dc
Exception Code: c0000005
Exception Offset: 00065860
OS Version: 6.0.6001.2.1.0.768.2
Locale ID: 3082
Additional Information 1: fd00
Additional Information 2: ea6f5fe8924aaa756324d57f87834160
Additional Information 3: fd00
Additional Information 4: ea6f5fe8924aaa756324d57f87834160
[/CODE]I don't have any problem with other programs, including msieve. Maybe is just because this computer is old, but it's strange.

I've just tried with Yafu 1.33 and it works perfectly

bsquared 2013-02-26 02:37

That definitely sounds strange. Can you run with -v and post a screenshot of yafu's screen output after it crashes?

I suspect the issue is lack of SSE2 on the machine... the -v screen output should give the info we need to tell.

Wick 2013-02-26 10:43

I have the same thing. With a 'small' number it works fine, but with a large one it doesn't.

Works fine:
[CODE]C:\temp\yafu>yafu-Win32.exe factor(28810398274578959718816270531375307346387) -v

02/26/13 11:41:52 v1.34.1 @ AB6WS-AI006, System/Build Info:
Using GMP-ECM 7.0-dev, Powered by MPIR 2.5.0
detected Pentium(R) Dual-Core CPU E5300 @ 2.60GHz
detected L1 = 32768 bytes, L2 = 2097152 bytes, CL = 64 bytes
measured cpu frequency ~= 2825.014010
using 20 random witnesses for Rabin-Miller PRP checks
===============================================================
======= Welcome to YAFU (Yet Another Factoring Utility) =======
======= [EMAIL="bbuhrow@gmail.com"]bbuhrow@gmail.com[/EMAIL] =======
======= Type help at any time, or quit to quit =======
===============================================================
cached 78498 primes. pmax = 999983

>> fac: factoring 28810398274578959718816270531375307346387
fac: using pretesting plan: normal
fac: no tune info: using qs/gnfs crossover of 95 digits
div: primes less than 10000
div: found prime factor = 23
div: found prime factor = 223
rho: x^2 + 3, starting 1000 iterations on C37
rho: x^2 + 2, starting 1000 iterations on C37
rho: found prp5 factor = 21649
rho: x^2 + 2, starting 1000 iterations on C33
rho: x^2 + 1, starting 1000 iterations on C33
rho: found prp8 factor = 13580279
Total factoring time = 0.0313 seconds

***factors found***
P2 = 23
P3 = 223
P5 = 21649
P8 = 13580279
P26 = 19106011292846314140844493
ans = 1
[/CODE]

Doesn't work:
[CODE]C:\temp\yafu>yafu-Win32.exe factor(288103982745789597188162705313753073463879082
5) -v

02/26/13 11:42:35 v1.34.1 @ AB6WS-AI006, System/Build Info:
Using GMP-ECM 7.0-dev, Powered by MPIR 2.5.0
detected Pentium(R) Dual-Core CPU E5300 @ 2.60GHz
detected L1 = 32768 bytes, L2 = 2097152 bytes, CL = 64 bytes
measured cpu frequency ~= 2634.936330
using 20 random witnesses for Rabin-Miller PRP checks
===============================================================
======= Welcome to YAFU (Yet Another Factoring Utility) =======
======= [EMAIL="bbuhrow@gmail.com"]bbuhrow@gmail.com[/EMAIL] =======
======= Type help at any time, or quit to quit =======
===============================================================
cached 78498 primes. pmax = 999983

>> fac: factoring 2881039827457895971881627053137530734638790825
fac: using pretesting plan: normal
fac: no tune info: using qs/gnfs crossover of 95 digits
div: primes less than 10000
div: found prime factor = 5
div: found prime factor = 5
div: found prime factor = 29
div: found prime factor = 37
div: found prime factor = 821
rho: x^2 + 3, starting 1000 iterations on C39
rho: x^2 + 2, starting 1000 iterations on C39
rho: found prp6 factor = 577097
rho: x^2 + 2, starting 1000 iterations on C33
rho: x^2 + 1, starting 1000 iterations on C33
pm1: starting B1 = 150K, B2 = gmp-ecm default on C33[/CODE]

skan 2013-02-26 11:42

1 Attachment(s)
Hello

My laptop is old but does have SSE
[ATTACH]9433[/ATTACH]
And I've tried with the -v option:

[CODE]yafu-Win32.exe "factor(2^(2^7)+1)" -v

02/26/13 11:16:49 v1.34 @ BRUX, System/Build Info:
Using GMP-ECM 7.0-dev, Powered by MPIR 2.5.0
detected Intel(R) Celeron(R) M CPU 430 @ 1.73GHz
detected L1 = 32768 bytes, L2 = 1048576 bytes, CL = 64 bytes
measured cpu frequency ~= 1736.980960
using 20 random witnesses for Rabin-Miller PRP checks

===============================================================
======= Welcome to YAFU (Yet Another Factoring Utility) =======
======= bbuhrow@gmail.com =======
======= Type help at any time, or quit to quit =======
===============================================================
cached 78498 primes. pmax = 999983


>> fac: factoring 340282366920938463463374607431768211457
fac: using pretesting plan: normal
fac: no tune info: using qs/gnfs crossover of 95 digits
div: primes less than 10000
rho: x^2 + 3, starting 1000 iterations on C39
rho: x^2 + 2, starting 1000 iterations on C39
rho: x^2 + 1, starting 1000 iterations on C39
pm1: starting B1 = 150K, B2 = gmp-ecm default on C39[/CODE]

It doesn't give any detail about the problem.
How can I provide you of debugging information?

Windows Vista 32, 1.5GB RAM.

skan 2013-02-26 13:20

Hello

I've just tried in a different computer,Win7 64, quad core, and I have the same error with the 32bit version.

The 64bit version works well

bsquared 2013-02-26 17:28

The Win32 executable was linked against the wrong ecm library. I've now corrected this (and another unrelated bug). Please re-download (version 1.34.2).


All times are UTC. The time now is 15:23.

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