20141126, 00:37  #1 
Einyen
Dec 2003
Denmark
101111000111_{2} Posts 
save question
If I run a P1 on for example M1277 and use save to save the residue at the end of stage1, the save file takes ~ 470 bytes. If I run P1 with Prime95 on M1277 the savefile at the end of stage1 takes ~ 250.000.000 bytes.
So GMPECM only saves a small residue but somehow it can still continute from it? How is Prime95 generating 250Mb from a "small" 385 digit number? Last fiddled with by ATH on 20141126 at 00:38 
20141126, 00:44  #2 
Apr 2007
Spessart/Germany
A2_{16} Posts 
250 MB save file for a P1 stage 1 sounds curious, indeed....
but can you tell me how you get a GMPECM compatible savefile from a *P1*stage 1 ? I'm doing this with ECMcurves, but never got it to work with P1. edit: if the P1 already startet with only 1 calculation (in prime95) in stage 2 done and the savefile was written after this calculation it sounds more normal Last fiddled with by MatWurS530113 on 20141126 at 00:47 
20141126, 10:16  #3  
Einyen
Dec 2003
Denmark
3^{2}·5·67 Posts 
Quote:
ecm pm1 save pm1save.txt 1e8 1e10 < number.txt or ecm pm1 save pm1save.txt 1e8 1 < number.txt and then you can take B1 higher later: ecm pm1 resume pm1save.txt save pm1save2.txt 1e9 1 < number.txt (Will run P1 with B1 from 1e8 to 1e9) You can actually run B1 from 1e8 to 1e9 without any save file as well, not sure if there is any benefit using the save file? : ecm pm1 1e81e9 1e11 < number.txt Last fiddled with by ATH on 20141126 at 10:21 

20141126, 18:18  #4 
Apr 2007
Spessart/Germany
10100010_{2} Posts 
thanks, but I still don't understand how you get a savefile from a P1 stage 1, which was done with prime95.
The directives to resume such a file with GMPECM are similar to resuming an ECMcurve stage 1 (of course with an additional pm1 directive). ....hmmm.... or do you use the *.bu; *.bu1 and*.bu2 files generatet by prime95 as a savefile? 
20141126, 22:57  #5 
Dec 2012
2·139 Posts 
Is this what you are looking for? From undoc.txt:
Code:
Alexander Kruppa wrote some code that allows the output of ECM stage 1 to be passed to Paul Zimmermann's more efficient GMPECM stage 2. This program is usually faster in stage 1. You can activate this feature by entering GmpEcmHook=1 in prime.txt. Then select ECM bound #2 between 1 and bound #1. Results.txt will contain data that can be fed to GMPECM for stage 2. 
20141127, 10:17  #6 
Basketry That Evening!
"Bunslow the Bold"
Jun 2011
40<A<43 89<O<88
3·29·83 Posts 
That's for ECM stage 1, not P1 stage 1 as was apparently used.

20141127, 16:29  #7  
Einyen
Dec 2003
Denmark
101111000111_{2} Posts 
I was not trying to do P1 stage1 on Prime95 and then stage2 on GMPECM. Unfortunately that is only for ECM.
I was just trying P1 on Prime95 and then wanted to test on GMPECM as well, and noted the strange file sizes, and then I started wondering what GMPECM uses from those small ~ 470 bytes savefiles  if anything  when you resume from them. Quote:
I noticed the Prime95 file size seems to be dependent on B1 more than the number. P1 on M1277 to B1=10^{11} takes 250Mb as I wrote earlier, but P1 on a 1M exponent to B1=10^{8} takes only 129 Kb. Last fiddled with by ATH on 20141127 at 16:37 

20141127, 16:51  #8 
Jun 2003
11357_{8} Posts 
That sounds wrong. It should have taken about 200 bytes (1277 bit residue + book keeping).
Sounds about right. 1M bits ~= 125 KB. 
20141127, 19:19  #9 
Einyen
Dec 2003
Denmark
3^{2}×5×67 Posts 
I tested that GMPECM actually uses the save file. I created a C88 = P29*P60 where:
P29 = 2*3234251*1532541289*1332541234207 + 1 so it will be found with P1 with B1>1.6*10^{9} and B2>1.4*10^{12} I ran B1 to 10^{9} and saved a file. Then resumed the file and ran B1 to 1.7*10^{9} and B2 = 2*10^{12} and it found the factor. Then I tried without resuming the savefile, just running B1=1*10^{9}  1.7*10^{9} and B2=10^{12} and it did not find the factor. 
20141128, 02:53  #10 
Romulan Interpreter
Jun 2011
Thailand
9,161 Posts 
For my curiosity, if it is not much trouble, can you try again for these two composites, save a partial to B1=10^9, and then resume with new B1 larger, same as in your example, and see if the factor is found. In the past I tried different "resume" features of different programs and I remember that resuming was not always right, if higher powers were involved, the additional prime from the power (the one which falls between the first B1 and the second B1 given after resuming) was not added to the exponent correctly. The "resuming" function has to parse all the smaller primes again and see if any of their power falls between old_B1 and new_B1, and if so, add them to exponent. Sometime this is "forgotten" and only new primes between old _B1 and new _B1 are added, therefore some "special" (rare, with high powers) factors will be missed.
Code:
A=18736359401021997693580332360210999173784687303545931753247634609406352840483449758684477 B=17318123479662276388571151809789728736219948022190985454837264839039662335893382229861517 
20141128, 05:36  #11  
Einyen
Dec 2003
Denmark
BC7_{16} Posts 
Quote:
I also created a new composite where the factor would be found in stage1, and it found it when resuming from the B1 = 1e9 save file. . 

Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Question about save & resume  frmky  GMPECM  7  20120802 08:22 
Save a piece of history!  Xyzzy  Programming  8  20120731 00:57 
How to save someone who was electrocuted in water?  Stargate38  Lounge  13  20120709 02:27 
save not working  R.D. Silverman  GMPECM  2  20110201 17:47 
P1 save files didn't save work  outlnder  Software  1  20030119 23:01 