mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > Msieve

Reply
 
Thread Tools
Old 2010-05-19, 15:51   #474
Brian Gladman
 
Brian Gladman's Avatar
 
May 2008
Worcester, United Kingdom

22×7×19 Posts
Default

The only condition I can see that would lead to the missing '*.ini' and '*.fb' files is when it is intended to run a factorisation from scratch but it has been run before and a spurious '*.resume' file from the previous run still exists. I could not see anything obvious in the log file.

Brian

Last fiddled with by Brian Gladman on 2010-05-19 at 15:52
Brian Gladman is offline   Reply With Quote
Old 2010-05-28, 11:53   #475
Mini-Geek
Account Deleted
 
Mini-Geek's Avatar
 
"Tim Sorbera"
Aug 2006
San Antonio, TX USA

17×251 Posts
Default

As noted here, factmsieve.py chokes when msieve finds factors (at least, factors due to the number being a prime power found during the polynomial selection).
Here's a log from the screen:
Code:
Msieve v. 1.44
Fri May 28 06:50:53 2010
random seeds: a84fa7fc 3deedde0
factoring 290064648515653604290850896210557000788223358877016965219834376481563501426743334123375488
518677419822009003459489974639850922949258651900751911554066671289177491607944029 (171 digits)
searching for 15-digit factors
prp57 factor: 661959776823384128858607768192010463436677049149657043109
prp57 factor: 661959776823384128858607768192010463436677049149657043109
prp57 factor: 661959776823384128858607768192010463436677049149657043109
elapsed time 00:00:03
-> ________________________________________________________________
-> | Running factmsieve.py, a Python driver for MSIEVE with GGNFS |
-> | sieving support. It is Copyright, 2010, Brian Gladman and is |
-> | a conversion of factmsieve.pl that is Copyright, 2004, Chris |
-> | Monico.       This is version 0.44, dated 26th January 2010. |
-> |______________________________________________________________|
-> This is client 1 of 1
-> Using 4 threads
-> Working with NAME = test
-> Error: Polynomial file test.poly does not exist!
-> Found n = 290064648515653604290850896210557000788223358877016965219834376481563501426743334123375
488518677419822009003459489974639850922949258651900751911554066671289177491607944029.
-> Running polynomial selection ...
-> msieve -s test.dat -l test.log -i test.ini -nf test.fb -v -np


Msieve v. 1.44
Fri May 28 06:50:56 2010
random seeds: 867cfc78 8f1b8ed8
factoring 290064648515653604290850896210557000788223358877016965219834376481563501426743334123375488
518677419822009003459489974639850922949258651900751911554066671289177491607944029 (171 digits)
searching for 15-digit factors
prp57 factor: 661959776823384128858607768192010463436677049149657043109
prp57 factor: 661959776823384128858607768192010463436677049149657043109
prp57 factor: 661959776823384128858607768192010463436677049149657043109
elapsed time 00:00:02
Traceback (most recent call last):
  File "C:\Files\Prime\aliquot\ggnfs-374\factmsieve.py", line 1975, in <module>
    run_msieve_poly(fact_p)
  File "C:\Files\Prime\aliquot\ggnfs-374\factmsieve.py", line 889, in run_msieve_poly
    fb_to_poly()
  File "C:\Files\Prime\aliquot\ggnfs-374\factmsieve.py", line 856, in fb_to_poly
    with open(NAME + '.fb', 'r') as in_f:
IOError: [Errno 2] No such file or directory: 'test.fb'
siever terminated
If you fixed this in a recent version, sorry, I haven't upgraded in a while.

Last fiddled with by Mini-Geek on 2010-05-28 at 12:35
Mini-Geek is offline   Reply With Quote
Old 2010-05-28, 12:41   #476
Brian Gladman
 
Brian Gladman's Avatar
 
May 2008
Worcester, United Kingdom

22·7·19 Posts
Default

I am not sure how to handle this. The script is designed to expect a polynomial and process this accordingly.

What msieve output do I need to look for in order to determine that it hasn't produced a polynomial but has instead produced factors? What files should I parse for the factors?

Brian
Brian Gladman is offline   Reply With Quote
Old 2010-05-28, 13:08   #477
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

67278 Posts
Default

I'm not sure it's worth worrying about this case, since the odds of a general input large enough for GNFS but actually a power is essentially zero. msieve gives no indication that it did not run GNFS, other than not printing 'commencing number field sieve' in the logfile.
jasonp is offline   Reply With Quote
Old 2010-05-28, 13:22   #478
Mini-Geek
Account Deleted
 
Mini-Geek's Avatar
 
"Tim Sorbera"
Aug 2006
San Antonio, TX USA

17×251 Posts
Default

Quote:
Originally Posted by Brian Gladman View Post
I am not sure how to handle this. The script is designed to expect a polynomial and process this accordingly.

What msieve output do I need to look for in order to determine that it hasn't produced a polynomial but has instead produced factors? What files should I parse for the factors?

Brian
Considering the rarity of it, if it's too hard to implement, you could just ignore it.
But if not, here's what msieve writes to msieve.log:
Code:
Fri May 28 08:18:28 2010  prp57 factor: 661959776823384128858607768192010463436677049149657043109
Fri May 28 08:18:28 2010  prp57 factor: 661959776823384128858607768192010463436677049149657043109
I suppose you could look for prpxx. If there was a very small factor, there can also be something like "p1 factor: 3".
Mini-Geek is offline   Reply With Quote
Old 2010-05-28, 16:28   #479
Brian Gladman
 
Brian Gladman's Avatar
 
May 2008
Worcester, United Kingdom

10000101002 Posts
Default

Is it always the case that there won't be a *.fb file when this happens? Do you know what is written to the normal log file, i.e. test.log in the example you gave above?

Brian
Brian Gladman is offline   Reply With Quote
Old 2010-05-28, 16:34   #480
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

3·1,181 Posts
Default

A *.fb file would not be generated because the factorization would be complete before the NFS code had a chance to run.
jasonp is offline   Reply With Quote
Old 2010-05-28, 16:56   #481
Mini-Geek
Account Deleted
 
Mini-Geek's Avatar
 
"Tim Sorbera"
Aug 2006
San Antonio, TX USA

17×251 Posts
Default

Quote:
Originally Posted by Brian Gladman View Post
Do you know what is written to the normal log file, i.e. test.log in the example you gave above?
Here it is:
Code:
Fri May 28 11:53:42 2010 -> Running polynomial selection ...
Fri May 28 11:53:42 2010 -> msieve -s test.dat -l test.log -i test.ini -nf test.fb -v -np
Fri May 28 11:53:42 2010  
Fri May 28 11:53:42 2010  
Fri May 28 11:53:42 2010  Msieve v. 1.44
Fri May 28 11:53:42 2010  random seeds: 2a73a3ec 23518efe
Fri May 28 11:53:42 2010  factoring 438190746132064523680359691464734744483214502885929539054808778130318905370682196955192091850205041234129084385881 (114 digits)
Fri May 28 11:53:43 2010  searching for 15-digit factors
Fri May 28 11:53:44 2010  prp57 factor: 661959776823384128858607768192010463436677049149657043109
Fri May 28 11:53:44 2010  prp57 factor: 661959776823384128858607768192010463436677049149657043109
Fri May 28 11:53:44 2010  elapsed time 00:00:02
And for full information and comparison purposes, here are msieve.log and the screen output:
Code:
msieve.log:
Fri May 28 11:53:40 2010  
Fri May 28 11:53:40 2010  
Fri May 28 11:53:40 2010  Msieve v. 1.44
Fri May 28 11:53:40 2010  random seeds: f38a85bc 983ba755
Fri May 28 11:53:40 2010  factoring 438190746132064523680359691464734744483214502885929539054808778130318905370682196955192091850205041234129084385881 (114 digits)
Fri May 28 11:53:41 2010  searching for 15-digit factors
Fri May 28 11:53:41 2010  prp57 factor: 661959776823384128858607768192010463436677049149657043109
Fri May 28 11:53:41 2010  prp57 factor: 661959776823384128858607768192010463436677049149657043109
Fri May 28 11:53:41 2010  elapsed time 00:00:01

screen:
Msieve v. 1.44
Fri May 28 11:53:40 2010
random seeds: f38a85bc 983ba755
factoring 438190746132064523680359691464734744483214502885929539054808778130318905370682196955192091
850205041234129084385881 (114 digits)
searching for 15-digit factors
prp57 factor: 661959776823384128858607768192010463436677049149657043109
prp57 factor: 661959776823384128858607768192010463436677049149657043109
elapsed time 00:00:01
-> ________________________________________________________________
-> | Running factmsieve.py, a Python driver for MSIEVE with GGNFS |
-> | sieving support. It is Copyright, 2010, Brian Gladman and is |
-> | a conversion of factmsieve.pl that is Copyright, 2004, Chris |
-> | Monico.       This is version 0.44, dated 26th January 2010. |
-> |______________________________________________________________|
-> This is client 1 of 1
-> Using 4 threads
-> Working with NAME = test
-> Error: Polynomial file test.poly does not exist!
-> Found n = 438190746132064523680359691464734744483214502885929539054808778130318905370682196955192
091850205041234129084385881.
-> Running polynomial selection ...
-> msieve -s test.dat -l test.log -i test.ini -nf test.fb -v -np


Msieve v. 1.44
Fri May 28 11:53:42 2010
random seeds: 2a73a3ec 23518efe
factoring 438190746132064523680359691464734744483214502885929539054808778130318905370682196955192091
850205041234129084385881 (114 digits)
searching for 15-digit factors
prp57 factor: 661959776823384128858607768192010463436677049149657043109
prp57 factor: 661959776823384128858607768192010463436677049149657043109
elapsed time 00:00:02
Traceback (most recent call last):
  File "C:\Files\Prime\aliquot\ggnfs-374\factmsieve.py", line 1975, in <module>
    run_msieve_poly(fact_p)
  File "C:\Files\Prime\aliquot\ggnfs-374\factmsieve.py", line 889, in run_msieve_poly
    fb_to_poly()
  File "C:\Files\Prime\aliquot\ggnfs-374\factmsieve.py", line 856, in fb_to_poly
    with open(NAME + '.fb', 'r') as in_f:
IOError: [Errno 2] No such file or directory: 'test.fb'
siever terminated

Last fiddled with by Mini-Geek on 2010-05-28 at 16:57
Mini-Geek is offline   Reply With Quote
Old 2010-05-28, 16:56   #482
Brian Gladman
 
Brian Gladman's Avatar
 
May 2008
Worcester, United Kingdom

22×7×19 Posts
Default

Thanks Mini-Geek and Jason.

I can clearly just exit if the *.fb file doesn't exist but I am wondering if I should write anything to the log file and the summary file when this happens. Does msieve write anything to the script's log file?

Looking at the structure of the script it might not be easy to do much.

Brian
Brian Gladman is offline   Reply With Quote
Old 2010-05-28, 17:05   #483
Mini-Geek
Account Deleted
 
Mini-Geek's Avatar
 
"Tim Sorbera"
Aug 2006
San Antonio, TX USA

17·251 Posts
Default

I just noticed that aliqueit had been set to run msieve before calling factmsieve (the option was made and I set it as such with a factmsieve.pl that doesn't use msieve for poly selection). The end result is still the same, of course, but it logs differently (only one msieve call and no msieve.log):
Code:
no msieve.log file

test.log:
Fri May 28 12:01:23 2010 -> Running polynomial selection ...
Fri May 28 12:01:23 2010 -> msieve -s test.dat -l test.log -i test.ini -nf test.fb -v -np
Fri May 28 12:01:23 2010  
Fri May 28 12:01:23 2010  
Fri May 28 12:01:23 2010  Msieve v. 1.44
Fri May 28 12:01:23 2010  random seeds: 6b80e878 37aece44
Fri May 28 12:01:23 2010  factoring 438190746132064523680359691464734744483214502885929539054808778130318905370682196955192091850205041234129084385881 (114 digits)
Fri May 28 12:01:24 2010  searching for 15-digit factors
Fri May 28 12:01:25 2010  prp57 factor: 661959776823384128858607768192010463436677049149657043109
Fri May 28 12:01:25 2010  prp57 factor: 661959776823384128858607768192010463436677049149657043109
Fri May 28 12:01:25 2010  elapsed time 00:00:02

screen:
-> ________________________________________________________________
-> | Running factmsieve.py, a Python driver for MSIEVE with GGNFS |
-> | sieving support. It is Copyright, 2010, Brian Gladman and is |
-> | a conversion of factmsieve.pl that is Copyright, 2004, Chris |
-> | Monico.       This is version 0.44, dated 26th January 2010. |
-> |______________________________________________________________|
-> This is client 1 of 1
-> Using 4 threads
-> Working with NAME = test
-> Error: Polynomial file test.poly does not exist!
-> Found n = 438190746132064523680359691464734744483214502885929539054808778130318905370682196955192
091850205041234129084385881.
-> Running polynomial selection ...
-> msieve -s test.dat -l test.log -i test.ini -nf test.fb -v -np


Msieve v. 1.44
Fri May 28 12:01:23 2010
random seeds: 6b80e878 37aece44
factoring 438190746132064523680359691464734744483214502885929539054808778130318905370682196955192091
850205041234129084385881 (114 digits)
searching for 15-digit factors
prp57 factor: 661959776823384128858607768192010463436677049149657043109
prp57 factor: 661959776823384128858607768192010463436677049149657043109
elapsed time 00:00:02
Traceback (most recent call last):
  File "C:\Files\Prime\aliquot\ggnfs-374\factmsieve.py", line 1975, in <module>
    run_msieve_poly(fact_p)
  File "C:\Files\Prime\aliquot\ggnfs-374\factmsieve.py", line 889, in run_msieve_poly
    fb_to_poly()
  File "C:\Files\Prime\aliquot\ggnfs-374\factmsieve.py", line 856, in fb_to_poly
    with open(NAME + '.fb', 'r') as in_f:
IOError: [Errno 2] No such file or directory: 'test.fb'
siever terminated
So msieve does write some things to the script's log file, including the factors (you might've read my pre-edit post saying there were no factors in test.log even though I showed them). But it doesn't, say, give a special message saying, "message to all people and scripts: factors were found even though you probably weren't expecting them".

Last fiddled with by Mini-Geek on 2010-05-28 at 17:10
Mini-Geek is offline   Reply With Quote
Old 2010-05-28, 17:42   #484
Brian Gladman
 
Brian Gladman's Avatar
 
May 2008
Worcester, United Kingdom

22·7·19 Posts
Default

Thats good as all I need to do is exit if no *.fb exists. It would be nice to write a summary file but this might be a bit tricky as I would have to skip a lot of normal processing to get to the end of the script.

Brian

Edit: here is an attachment that attempts to remove this problem.
Attached Files
File Type: zip factmsieve.py.69.zip (18.9 KB, 93 views)

Last fiddled with by Brian Gladman on 2010-05-28 at 18:01
Brian Gladman is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Msieve & ggnfs on MacOS xilman Msieve 8 2017-05-20 00:12
Factorizing with MSIEVE, GGNFS & Factmsieve.py Romuald Msieve 24 2015-11-09 20:16
Infinite loop for ggnfs or msieve Greebley Aliquot Sequences 4 2013-02-06 19:28
Error running GGNFS+msieve+factmsieve.py D. B. Staple Factoring 6 2011-06-12 22:23
A new driver? (or type of driver?) 10metreh Aliquot Sequences 3 2010-02-15 15:57

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


Mon Aug 2 10:54:37 UTC 2021 up 10 days, 5:23, 0 users, load averages: 1.84, 1.74, 1.60

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.