mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > GMP-ECM

Reply
 
Thread Tools
Old 2007-04-07, 20:23   #1
Andi47
 
Andi47's Avatar
 
Oct 2004
Austria

1001101100102 Posts
Default Feature Request!!! Save after p-1 Step 1

This happened after a p-1 attempt with:
ecm -v -resume 5_3_257+_pm1_1e9.sav -save 5_3_257+_pm1_10e9.sav -maxmem 2500 10e9 >5_3_257+_pm1_10e9.out

Code:
GMP-ECM 6.1.1 [powered by GMP 4.2.1] [ECM]
Resuming P-1 residue saved by Andreas@ANDREAS with GMP-ECM 6.1.1 on Sat Apr 07 12:40:48 2007 
Input number is 175619522044094444730646441116709020054232412086062437698861604586816985151966452610210857901106313441605170982007750547 (120 digits)
Using mpz_powm
Using B1=1000000000-10000000000, B2=1410065408-15893193115816, polynomial x^120
dF=524288, k=5, d=5705700, d2=17, i0=231
Step 1 took 10567515ms
Using 28 small primes for NTT
Estimated memory usage: 2102M
Initializing table of differences for F took 1141ms
Computing roots of F took 66844ms
Building F from its roots took 167125ms
Computing 1/F took 109921ms
Initializing table of differences for G took 1468ms
Computing roots of G took 53750ms
Error:
Code:
This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information
Savefile is empty - 3 cpu-hours for nothing...

Last fiddled with by Andi47 on 2007-04-07 at 20:24 Reason: Typo
Andi47 is offline   Reply With Quote
Old 2007-04-08, 00:33   #2
jasong
 
jasong's Avatar
 
"Jason Goatcher"
Mar 2005

66638 Posts
Default

Quote:
Originally Posted by Andi47 View Post
Error:
Code:
This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information
Savefile is empty - 3 cpu-hours for nothing...
You think that's annoying? Try ecming on wblipp's "Most Wanted" server. A lightning storm at the right(wrong?) time could make me cry like a little girl. (not really, but it's still really stressful).

I think it would be great if any curve that takes more than an hour could have a setable save feature.
jasong is offline   Reply With Quote
Old 2007-04-08, 07:04   #3
Andi47
 
Andi47's Avatar
 
Oct 2004
Austria

2×17×73 Posts
Default

Quote:
Originally Posted by jasong View Post
You think that's annoying? Try ecming on wblipp's "Most Wanted" server. A lightning storm at the right(wrong?) time could make me cry like a little girl. (not really, but it's still really stressful).

I think it would be great if any curve that takes more than an hour could have a setable save feature.
I agree about the save feature. This time it was *only* three hours (normally I set B2 to 1 to avoid this kind of loss and do stage 2 later, but this time I forgot and Murphys Law striked), but one time I had lost 5 *days* of a p-1 stage 2 (was B1=150e9, B2=739,720,038,949,720) because I had to switch off the Laptop for transport and Standby did not work properly.
Andi47 is offline   Reply With Quote
Old 2007-04-11, 16:21   #4
akruppa
 
akruppa's Avatar
 
"Nancy"
Aug 2002
Alexandria

246710 Posts
Default

I fully agree that this feature is missing. Only problem is that in order to put the feature in, we'll have to rearrange some code - the ECM computations are part of the library, whereas the savefile I/O are part of the application. We'll either have to move the savefile I/O into the library, where it doesn't belong imho, or add some kind of callback interface. It'll happen eventually...

Alex
akruppa is offline   Reply With Quote
Old 2007-04-11, 18:06   #5
Andi47
 
Andi47's Avatar
 
Oct 2004
Austria

2·17·73 Posts
Default

Quote:
Originally Posted by akruppa View Post
I fully agree that this feature is missing. Only problem is that in order to put the feature in, we'll have to rearrange some code - the ECM computations are part of the library, whereas the savefile I/O are part of the application. We'll either have to move the savefile I/O into the library, where it doesn't belong imho, or add some kind of callback interface. It'll happen eventually...

Alex
This feature missing and even more the inability to do interim saves during step 2 are the main reasons why I stopped attacking M1061. I don't want to lose 3 weeks of cpu-time during p-1ing with B1=5e11 (or even 1e12 ) and b2=2e15 due to a power outage or the need to transport my laptop and the windoze standby not working properly...

Last fiddled with by Andi47 on 2007-04-11 at 18:07
Andi47 is offline   Reply With Quote
Old 2007-04-12, 09:29   #6
akruppa
 
akruppa's Avatar
 
"Nancy"
Aug 2002
Alexandria

1001101000112 Posts
Default

You can always do stage 1 in smaller pieces. I.e. go to B1=5e10 and save, resume that and to to B1=1e11 and save, resume that, etc...

There might be an interim save feature for stage 2 some day, but the working data set is very large. Then again, the -treefile option saves most of that intermediate data already, so saving the rest at periodic intervals (say, after each block) shouldn't be too much worse. As a workaround, you can do stage 2 in steps as well, using the B2min-B2max options, i.e.

ecm -resume savefile.1e10 1e10 1e10-1e14
ecm -resume savefile.1e10 1e10 1e14-2e14
ecm -resume savefile.1e10 1e10 2e14-3e14
...

adding the (currently broken, sorry!) -maxmem or (functioning, yay!) -k parameters as necessary to get the polynomial degree and hence memory use you want.

Alex
akruppa is offline   Reply With Quote
Old 2007-04-12, 10:14   #7
Andi47
 
Andi47's Avatar
 
Oct 2004
Austria

2×17×73 Posts
Default

Quote:
Originally Posted by akruppa View Post
You can always do stage 1 in smaller pieces. I.e. go to B1=5e10 and save, resume that and to to B1=1e11 and save, resume that, etc...

There might be an interim save feature for stage 2 some day, but the working data set is very large. Then again, the -treefile option saves most of that intermediate data already, so saving the rest at periodic intervals (say, after each block) shouldn't be too much worse. As a workaround, you can do stage 2 in steps as well, using the B2min-B2max options, i.e.

ecm -resume savefile.1e10 1e10 1e10-1e14
ecm -resume savefile.1e10 1e10 1e14-2e14
ecm -resume savefile.1e10 1e10 2e14-3e14
...

adding the (currently broken, sorry!) -maxmem or (functioning, yay!) -k parameters as necessary to get the polynomial degree and hence memory use you want.

Alex
I know, that I can do stage 1 in steps - I am frequently using this feature.

I did not know, that this is also possible for stage 2, thanks for pointing out.

Questions:

When I do like you said (i.e. entering B2 ranges of 1e10-1e14, 1e14-2e14, etc.), does it save the results of B2, so that I can continue for example at 2e14, or - if not - how does this work? (example: If the second largest factor of p-1 is 9e9 and the biggest is 2.5e14, the factor is found when doing b2=2e14 -3e14, but not with 1e14-2e14 or 3e14-4e14 in your example, am I right?)
Andi47 is offline   Reply With Quote
Old 2007-04-12, 11:04   #8
akruppa
 
akruppa's Avatar
 
"Nancy"
Aug 2002
Alexandria

2,467 Posts
Default

It does not save the highest B2 value tried so far anywhere, you'll have to specify the B2 range you want to do manually each time.

Where exactly the factor p with largest factor in p-1 around 2.5e14 will be found is hard to tell, due to the Brent-Suyama extension.
With -power 2, it will be as you suggested. However, if the B2 value is much higher than 2.5e14, it might be included as a composite value, i.e. if q*2.5e14 is in your B2min-B2max range for some q that does not divide d1*d2.
With Brent-Suyama, all bets are off... the missing prime in p-1 might be included pretty much at any time during stage 2, if you're lucky. But it is still true that if the missing prime is in B2min-B2max, it will be included in any case, and the factor will be found.

Alex

Last fiddled with by akruppa on 2007-04-12 at 11:05
akruppa is offline   Reply With Quote
Old 2007-04-12, 11:12   #9
Andi47
 
Andi47's Avatar
 
Oct 2004
Austria

2×17×73 Posts
Default

Thanks.

So - do I understand right, that - if I have got enough RAM or specify -maxmem smaller half of available RAM - I could also do parallelized Stage 2 - i.e. one CPU does B2 = 1e14-2e14 and the other does B2 = 2e14-3e14 at the same time ?

Last fiddled with by Andi47 on 2007-04-12 at 11:12
Andi47 is offline   Reply With Quote
Old 2007-04-12, 11:40   #10
akruppa
 
akruppa's Avatar
 
"Nancy"
Aug 2002
Alexandria

2,467 Posts
Default

You could, but stage 2 gets more efficient as the degree dF of the polynomial increases. A better way of scheduling work would be to let one cpu do stage 1 on another number which uses almost no memory, and let the other cpu do stage 2 and give it all the memory your machine has.

Alex
akruppa is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Feature request tcharron Software 3 2018-10-03 20:08
Feature request JuanTutors Software 22 2013-03-11 19:23
Feature Request Uncwilly Software 0 2008-03-06 21:07
Feature Request: Power save option drew Software 7 2007-04-24 13:12
Feature Request moo Software 24 2005-11-26 22:08

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

Mon Apr 19 12:00:44 UTC 2021 up 11 days, 6:41, 0 users, load averages: 1.57, 1.85, 2.00

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.