mersenneforum.org -save question
 User Name Remember Me? Password
 Register FAQ Search Today's Posts Mark Forums Read

 2014-11-26, 00:37 #1 ATH Einyen     Dec 2003 Denmark 57358 Posts -save question If I run a P-1 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 P-1 with Prime95 on M1277 the savefile at the end of stage1 takes ~ 250.000.000 bytes. So GMP-ECM 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 2014-11-26 at 00:38
 2014-11-26, 00:44 #2 MatWur-S530113     Apr 2007 Spessart/Germany 16210 Posts 250 MB save file for a P-1 stage 1 sounds curious, indeed.... but can you tell me how you get a GMP-ECM compatible save-file from a *P-1*-stage 1 ? I'm doing this with ECM-curves, but never got it to work with P-1. edit: if the P-1 already startet with only 1 calculation (in prime95) in stage 2 done and the save-file was written after this calculation it sounds more normal Last fiddled with by MatWur-S530113 on 2014-11-26 at 00:47
2014-11-26, 10:16   #3
ATH
Einyen

Dec 2003
Denmark

3,037 Posts

Quote:
 Originally Posted by MatWur-S530113 but can you tell me how you get a GMP-ECM compatible save-file from a *P-1*-stage 1 ? I'm doing this with ECM-curves, but never got it to work with P-1.
You can add the -save option and run P-1 either with B2=1 or some B2 value you want to test before taking B1 higher:

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 P-1 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 1e8-1e9 1e11 < number.txt

Last fiddled with by ATH on 2014-11-26 at 10:21

 2014-11-26, 18:18 #4 MatWur-S530113     Apr 2007 Spessart/Germany 2·34 Posts thanks, but I still don't understand how you get a save-file from a P-1 stage 1, which was done with prime95. The directives to resume such a file with GMP-ECM are similar to resuming an ECM-curve 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 save-file?
 2014-11-26, 22:57 #5 Jayder     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 GMP-ECM 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 GMP-ECM for stage 2.
 2014-11-27, 10:17 #6 Dubslow Basketry That Evening!     "Bunslow the Bold" Jun 2011 40
2014-11-27, 16:29   #7
ATH
Einyen

Dec 2003
Denmark

3,037 Posts

I was not trying to do P-1 stage1 on Prime95 and then stage2 on GMP-ECM. Unfortunately that is only for ECM.

I was just trying P-1 on Prime95 and then wanted to test on GMP-ECM as well, and noted the strange file sizes, and then I started wondering what GMP-ECM uses from those small ~ 470 bytes savefiles - if anything - when you -resume from them.

Quote:
 By default P-1 work does not delete the save files when the work unit completes. This lets you run P-1 to a higher bound at a later date. You can force the program to delete save files by adding this line to prime.txt: KeepPminus1SaveFiles=0
Apparantly Prime95 does use something from its savefiles to continue to higher bounds.

I noticed the Prime95 file size seems to be dependent on B1 more than the number. P-1 on M1277 to B1=1011 takes 250Mb as I wrote earlier, but P-1 on a 1M exponent to B1=108 takes only 129 Kb.

Last fiddled with by ATH on 2014-11-27 at 16:37

2014-11-27, 16:51   #8
axn

Jun 2003

12F816 Posts

Quote:
 Originally Posted by ATH P-1 on M1277 to B1=1011 takes 250Mb as I wrote earlier
That sounds wrong. It should have taken about 200 bytes (1277 bit residue + book keeping).

Quote:
 Originally Posted by ATH but P-1 on a 1M exponent to B1=108 takes only 129 Kb.
Sounds about right. 1M bits ~= 125 KB.

 2014-11-27, 19:19 #9 ATH Einyen     Dec 2003 Denmark 303710 Posts I tested that GMP-ECM actually uses the save file. I created a C88 = P29*P60 where: P29 = 2*3234251*1532541289*1332541234207 + 1 so it will be found with P-1 with B1>1.6*109 and B2>1.4*1012 I ran B1 to 109 and saved a file. Then resumed the file and ran B1 to 1.7*109 and B2 = 2*1012 and it found the factor. Then I tried without resuming the savefile, just running B1=1*109 - 1.7*109 and B2=1012 and it did not find the factor.
 2014-11-28, 02:53 #10 LaurV Romulan Interpreter     Jun 2011 Thailand 23×19×61 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
2014-11-28, 05:36   #11
ATH
Einyen

Dec 2003
Denmark

57358 Posts

Quote:
 Originally Posted by LaurV 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.
This is what I did. I ran B1 to 1e9 then saved, then resumed and ran B1 to 1.7e9 and B2 to 2e12 and it found it. I now also tried saving again at 1.7e9 and running stage2 separately and it still found it.

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 frmky GMP-ECM 7 2012-08-02 08:22 Xyzzy Programming 8 2012-07-31 00:57 Stargate38 Lounge 13 2012-07-09 02:27 R.D. Silverman GMP-ECM 2 2011-02-01 17:47 outlnder Software 1 2003-01-19 23:01

All times are UTC. The time now is 08:19.

Mon Mar 1 08:19:44 UTC 2021 up 88 days, 4:31, 0 users, load averages: 1.74, 1.68, 1.52

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.