20150302, 00:41  #1  
P90 years forever!
Aug 2002
Yeehaw, FL
2×3^{2}×7×59 Posts 
How to use prime95 for stage 1 & GMPECM for stage 2
Quote:


20150302, 00:59  #2 
Sep 2002
Oeiras, Portugal
2^{2}×3×11^{2} Posts 
No. I´m using Prime95 for both stages.
Is there any GMPECM version for windows? And if yes, can you point me to the binaries? I´m assuming GMPECM brings some advantage over Prime95 for stage 2, otherwise you wouldn´t have posed the question. 
20150302, 04:34  #3 
P90 years forever!
Aug 2002
Yeehaw, FL
2·3^{2}·7·59 Posts 
I don't know about binaries  I expect there are some available.
Yes, GMPECM, given enough memory, is vastly superior for small exponents. It runs a much deeper stage 2, which lets you run far fewer curves. I'm not sure about exponents near 20000, if you decide to investigate I'd be curious as to what you find out. You'll need to look up the GmpEcmHook=1 option in undoc.txt. 
20150302, 22:25  #4  
"Curtis"
Feb 2005
Riverside, CA
11213_{8} Posts 
Quote:
http://gilchrist.ca/jeff/factoring/index.html The maintainer is an infrequent poster here. The fastest use is Prime95 for stage1, save residues, use them as input for GMPECM stage 2. George is asking about memory requirements for exponents under 20k; I have a 16Gb system so I may be able to answer this if you cannot. Use the "v" flag when experimenting with B2 bounds to see how much memory is needed and how many curves make a t45 with each setting of B2. The higher your B2, the higher the chance to find a factor per curve, thus the required curve count for each level decreases. Last fiddled with by VBCurtis on 20150302 at 22:27 

20150303, 01:43  #5  
Sep 2002
Oeiras, Portugal
2654_{8} Posts 
Quote:
For now, just one: the advantage of running Stage 1 on Prime95 and Stage 2 on GMPECM holds only for small exponents, as I understood it. But, how small? 

20150303, 04:22  #6 
P90 years forever!
Aug 2002
Yeehaw, FL
16412_{8} Posts 

20150303, 04:37  #7 
"Phil"
Sep 2002
Tracktown, U.S.A.
3·373 Posts 
I had good results running stage 2 with GMPECM on M8191 using 3 MB of allocated memory, so I am pretty sure that you should still find it useful on M11243. The one problem I had was that the only way I could get GMPECM to log its results was to write the entire log file to memory, which gave me one huge file. I would have liked the capability to just log results if a factor was found. If anyone has a suggestion of how to do that, I would love to hear about it.

20150303, 06:04  #8 
Jun 2003
11·449 Posts 

20150303, 15:11  #9 
Sep 2002
Oeiras, Portugal
2^{2}·3·11^{2} Posts 
So I have given GMPECM a try, and as expected some questions popped up. Don´t want to be a PITA, but can´t help bring some to the thread. May some knowledgeable (and patient) member shed any light on my confused mind...
I started by running Prime95 ECM, using B1=B2=11000000, on M11423. I inserted the GmpEcmHook=1 line in prime.txt. All fine, Prime95 ran Stage 1 only, and wrote a residue to the results file. I copied said residue to a file named work.txt, and ran GMPECM using the following command: ecm v resume work.txt 11000000 The program started, by printing some lines of info, including the value I had given for B1 and a calculated value B2=30114149530. It also listed the expected number of curves for finding factors of different sizes. It also mentioned that it was resuming a residue saved with Prime95, which I took as a sign things were going as expected. After a while, the message Step 1 took 2510343 ms popped up. My first question: is this Step 1 the Stage 1? If yes, what is the point in running it in Prime95 only to have it rerun by GMPECM? I was under the impression that GMPECM would only run the Stage 2 in this "resume" situation. It then gave a memory usage estimation of 2749M, which is fine, as I have over 6G available. So I think at this point it started running Stage 2. Severall lines regarding initializations and computations of different sorts followed, then the message Step 2 took 652360 ms popped up. Below it, the program displayed a list of expected times to find a factor of n digits. Last line was: Save file line has no equal sign after: UID: lycorn/ast. And that was it. I think in general terms it went well, but in order to make some sense of it and using it regularly, I need to understand a couple of things: First, I was really confused by the fact that the Stage 1 was apparently run by GMPECM  in fact it took way longer than Stage 2, and also much longer than Stage 1 run by Prime95. As it is resuming a computation that has finished Stage 1, I supposed it would only run Stage 2. How can we get it to do it ? Second, where have the results gone, so they can be reported to Primenet? I suspect nowhere, which means the program doesn´t automatically create something similar to the "results" file of Prime95. Does it have to be created at runtime, using the save switch? Third, If my interpretation is correct:  I ran just one curve, which took 2510343 + 652360 ms ~ 52.71 minutes  The prescribed number of curves for finding a 45 digit factor (in line with a B1=11000000) is 4630 (this number was taken from the list given at the end of Stage 1). At the end of Stage 2, the listed expected time to find a 45 digit factor was 169.49 days, which matches perfectly the figures for number of curves and duration of each one. On my computer, Prime95 runs a curve on M11423, @B1=11000000 in 16 minutes, and the prescribed number of curves is 9700, which gives 107,(7) days. This shows that using Prime95 only would be much faster. There´s certainly something I´m missing here  I guess it has to do with running the Stage 1 on GMPECM and on Prime95, Stage 1 takes so long that it more than makes up for the gain in running less curves at a higher B2, on GMPECM. Any clarification would be much appreciated. Thanks in advance Last fiddled with by lycorn on 20150303 at 15:26 
20150303, 16:22  #10 
Jun 2003
11×449 Posts 
I think you need to give both B1 and B2, like so:
Code:
ecm v resume work.txt 1 11e630e9 
20150303, 16:40  #11  
"Victor de Hollander"
Aug 2011
the Netherlands
10010011000_{2} Posts 
Quote:
It should say something like this: Code:
Resuming ECM residue saved with Prime95 Input number is x (x digits) Using B1=1, B2=x polynomial Dickson(x), sigma=x Step 1 took x ms Step 2 took x ms Last fiddled with by VictordeHolland on 20150303 at 16:40 

Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
GMPECM & Prime95 Stage 1 Files  Gordon  GMPECM  3  20160108 12:44 
Stage 1 with mprime/prime95, stage 2 with GMPECM  D. B. Staple  Factoring  2  20071214 00:21 
Need help to run stage 1 and stage 2 separately  jasong  GMPECM  9  20071025 22:32 
P4 Prescott  31 Stage Pipeline ? Bad news for Prime95?  Angular  Hardware  18  20041115 07:04 
Stage 1 and stage 2 tests missing  Matthias C. Noc  PrimeNet  5  20040825 15:42 