mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Msieve (https://www.mersenneforum.org/forumdisplay.php?f=83)
-   -   Python Driver for GGNFS and MSIEVE (https://www.mersenneforum.org/showthread.php?t=12981)

yoyoyogi 2010-03-09 01:40

The OS is Windows Server 2008 Standard SP2. I'm not familiar with this OS, but it was already installed on the system I'm using. All components for factoring were installed and executed as Administrator. I'm familiar with permission based issues in Linux, but not in Windows. Perhaps it has to do with executing Python on Windows Server? I'll look into this.
Thank you,
-Yogesh

Brian Gladman 2010-03-09 07:45

I doubt that it has anything to do with Python since the missing file is one that should be written by msieve before it returns to the Python code. Moreover, msieve is signalling an error of some kind when it finishes, which is consistent with an msieve issue of some kind. I am not familiar with the details of what msieve does when it terminates but Jason may be able to suggest some possible failures that could have occurred.

Brian

jasonp 2010-03-09 12:54

I think the problem is just that the polynomial selection didn't find any polynomials. How large is the input number?

Edit: of course you're factoring an RSA key. Inputs like this are too large for msieve's polynomial selection unless you have the graphics card version, or have many machines. Even then finding even one polynomial will take several days. With limited resources you're better off using pol51

Brian Gladman 2010-03-10 10:34

Jason, would it be possible to have some meaningful error return codes from msieve? I could then improve feedback to users when things seem to go wrong.

Brian

yoyoyogi 2010-03-10 17:28

[quote=jasonp;207814]I think the problem is just that the polynomial selection didn't find any polynomials. How large is the input number?

Edit: of course you're factoring an RSA key. Inputs like this are too large for msieve's polynomial selection unless you have the graphics card version, or have many machines. Even then finding even one polynomial will take several days. With limited resources you're better off using pol51[/quote]

The input number is 154 digits. This would explain why I had success with the 100 digit example number from this beginner's guide ([url]http://gilchrist.ca/jeff/factoring/nfs_beginners_guide.html[/url]), but not this number on the same system. What kind of resources would it take to factor this number within 1-2 months?

Thanks for your help,
-Yogesh

Andi47 2010-03-10 18:09

[QUOTE=yoyoyogi;207970]The input number is 154 digits. This would explain why I had success with the 100 digit example number from this beginner's guide ([url]http://gilchrist.ca/jeff/factoring/nfs_beginners_guide.html[/url]), but not this number on the same system. What kind of resources would it take to factor this number within 1-2 months?

Thanks for your help,
-Yogesh[/QUOTE]

A Core 2 Duo (which is running 24/7) should be able to do it in ~2 months (or maybe 1-2 weeks longer).

You will need 2 GB RAM for the matrix.

jasonp 2010-03-10 19:12

[QUOTE=Brian Gladman;207924]Jason, would it be possible to have some meaningful error return codes from msieve? I could then improve feedback to users when things seem to go wrong.
[/QUOTE]
I think now would be a good time to finally correct the error reporting in the library; will get to it as time allows.

debrouxl 2010-03-10 19:15

Agreed, for 512-bit RSA keys (well, that's what many GNFS tasks of difficulty 154-155 are :grin:) in a 2 months, you need [i]at least[/i] a dual-core CPU and 2 GB of RAM.
As a complement to Andi's post: 3 GB of RAM would buy you more comfort (in case you end up with a 5M x 5M or larger matrix, or you simply need to use the computer for other tasks).

Mini-Geek 2010-03-15 18:49

Tired of seeing something like "Found 1952010 relations, 99.5% of the estimated minimum (1961927)." and it sieving a whole extra portion, I decided to make this little patch to make it do post-proc it if it's 95% or more, instead of 100% or more: (bold means new code)
[code]# Set global flags to control operation

...
VERBOSE = True
[B]FRACTION_OF_ESTIMATED = 0.95
[/B]...
cs = ('Found {0:d} relations, {1:2.1f}% of the estimated minimum ({2:d}).'
.format(curr_rels, pc, lats_p['minrels']))
write_string_to_log(cs)
print(cs)
if curr_rels > [B]FRACTION_OF_ESTIMATED*[/B]lats_p['minrels']:[/code](lines 89 and 1709)
I think it'd be a good idea to implement this (though maybe with a different variable name, I just picked something so I could change it a bit more easily than re-finding that code) into the main releases of factmsieve.py. :smile:
This change has had only minimal testing, (i.e. I resumed a test and it got 99.5% of the estimated relations, and it went straight to post-proc as expected) but it's so simple I don't foresee anything going wrong because of it.

Brian Gladman 2010-03-16 10:47

But this change is the same as reducing the minrels estimate. So I assume that you are, in effect, saying that the minrels estimate is 5% too high for the sort of numbers you are tackling. What are the lpbr/a values to which this 5% applies?

Brian

Mini-Geek 2010-03-16 12:20

[quote=Brian Gladman;208523]But this change is the same as reducing the minrels estimate.[/quote]
Huh, I hadn't thought of it that way...I just wanted to give it a little wiggle room so it'd try to post-proc before it was quite at 100%. But still, I guess you're right about what I was implying (though I didn't realize it at the time).

Or, to look at the issue from another point of view, maybe the script could be modified to see this information:
"Each section of work gets about x% of the estimate." and
"I'm now much closer to the estimate than x%."
And, instead of taking this action:
"So I'll sieve another full section of work and overshoot 100% by a lot."
Take this one:
"So I'll sieve what I can expect will put me a little over 100% and then see if I'm there."
e.g. if it goes from 84.5% to 99.5%, (15%) then it decides to only sieve 1/20th of the normal length, finishes at about 100.25%, (99.5%+15/20=100.25%) and continues to post-proc (or, in the event that it hasn't gone over 100%, the process repeats).
[quote=Brian Gladman;208523]So I assume that you are, in effect, saying that the minrels estimate is 5% too high for the sort of numbers you are tackling. What are the lpbr/a values to which this 5% applies?

Brian[/quote]
The numbers I've ran since my modification were in the 92-95 digit range. They all have this line in their g9x-test.txt file:
[code]Large prime bits: 25/25
[/code]I'm assuming that means the lpbr/a values are 25. (there are no other references to it in the files left behind after the cleanup)
I'd have to run more tests to see just how few relations it can have at different sizes for it to still finish, but on a c92 I got to 95.7% and it still finished. ("Found 1677546 relations, 95.7% of the estimated minimum (1753486).")
If you want me to run some trials to find the minimum relations for some size(s), let me know what size(s) and any other info I need.


All times are UTC. The time now is 22:43.

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